Link from EPUB to PDF

5 posts / 0 new
Last post

My client's book is mostly text except for some forms at the end. He wants the reader to be able to print (or fill in and print) the forms. So the forms should be in PDF.

In my ebook I would like to include an image of each form along with a link to a PDF of that form. A few questions (please go easy; PDFs are old hat, but ebooks are new for me):

-- Will I be able to include the PDF inside the .epub archive, or will this only work if I link to an externally hosted PDF (like "http: // www. example. com/ myform1 .pdf", sorry for the spaces, won't get past spam blocker without them)?

-- How do the different ebook readers handle a link like this?

-- He wants .epub and .mobi formats. Will this scheme work at all on Kindle?

Thanks for any help.

Ken Benson

If you can link out to a pdf on the web, that's going to be the most reliable way for users to get access to it, regardless of format. When the user clicks the external link, reading systems will spawn an external browser instance to download/open the file or open it directly, but it should open.

You can embed PDFs in the EPUB container, and link to them, but then you get into what are called "manifest fallbacks". And odds are very high that the PDF will be ignored and your fallback rendered instead, leaving you to have to link to the web anyway if you want to ensure the PDF versions are available. Oh, and of this is all very EPUB-specific.

Why not to use the form elements of XHTML inside the book?
In general, this is printable and ok for EPUB 3.
As long, as one does not want to send or to evaluate the form information, this causes no problem. However to save the input from the user by the user, I think, is not directly possible without further tricks. But if the design of the document with the XHTML form is simple straight forward, it is simple for users so save such a form document and complete it with a simple text editor.
If we take into account the accessibility problems of PDF and that many people have to print such PDF forms anyway to complete the printed version only with a pencil, the XHTML variant is still the much better approach.

However, obviously if one needs to send the form, there is a need for a server sided script
(for example PHP) to evaluate the form input and to construct an output, that is printable.
If the viewer is not connected to internet, some evaluation and DOM manipulation only with javascript is not a complete alternative, because interpretation is optional.
If one uses an email-address as a value for the action attribute of the form, the problem can be, that there is no email program or without internet connection it cannot be send either.
An alternative could be some text what to do to get the information to the intended recipient.
Because without internet connection contact requires some more efforts from the user anyway, it might be acceptable to provide an URI and an additional classical post address for later usage. Even here for the URI it is the better choice to reference an (X)HTML form instead of a
not generally accessible PDF form.

Thanks, Matt, I think we're going to go with a link and an externally hosted PDF, maybe a fill-in PDF if I can get the client to pay for the time.

Thanks, O.H. I think you're right--a hosted html form would probably work the best. I doubt I can get my client to pay for it, though. He's already got a form made. Converting to PDF and uploading it to his website is trivial. Adding a link to the ebook is easy. Making an html form would take a few hours, and I think it would still have to be hosted, so the form in the ebook would still be a crappy bitmap with a link to the html form.

If you only need some graphics looking like a form without functionality in the book, you can use SVG. For example for single pages it should be possible to use inkscape to convert exiting
graphics in the formats PDF or postscript to SVG, usable inside EPUB 3 directly as content document.
Typically an XHTML form with functionality should be pretty simple, as long as you need no specific design - probably anyway inside EPUB books you will not want to use so much 'bitmap'-design due to the problems, viewers like readium have with larger (raster) images.

Secondary menu