<a href><img> Doesn't work in pdf
2.0.0 alpha 6
Using basic 'a' and 'img' tags works fine using 'gitbook serve', but links are disabled in pdfs.
<a href="http://google.com"><img src="images/download_library.png" width="50%" style="float:right; padding-left:10px"/></a>
Can you try: gitbook build --format=ebook and let me now if the file contains the link or not (the format ebook generates the html used before the transformation to ebook).
I ran that command, but don't see an ebook output anywhere. It looks like it's just rebuilding the site... Do I need to add something to book.json?
The "ebook" format doesn't generate an ebook file, it build a version of the website that can be convert as an ebook file (basically some very simple html files).
The process for building a pdf is:
input book -> [parsing] -> [generation website format "ebook"] -> html files -> [ebook_convert] -> pdf file
So run this command and take a look at the files in the _book folder, then paste me the output of the html file where are the links.
Sorry, I confused ebook with epub.
Here's the output:
before
<a href="http://google.com"><img src="images/download_library.png" width="50%" style="float:right; padding-left:10px"/></a>
after
<a href="http://google.com" target="_blank"><img src="images/download_library.png" width="50%" style="float:right; padding-left:10px"></a>
What do you mean by "disabled in pdf" ?
Nothing happens if I click on the image.
I am having same issues. When adding a link to an image, there is no link in the pdf output. I am using this code structure:
[](http://www.site.com)