Create eBook

Hi Forum,

I wonder if anyone has got an idea how to convert a pdf file into an eBook by means of XOJO?
Any hints would be highly appreciated.

change the .epub extension to .zip
unzip the ebook
you get a folder with html files inside

[quote=249434:@Heinz-Jürgen Groß]Hi Forum,

I wonder if anyone has got an idea how to convert a pdf file into an eBook by means of XOJO?
Any hints would be highly appreciated.[/quote]

It is not that simple, but the principle is that an .epub is in XML format inside a zip container. See http://idpf.org/epub

You can see what an epub contains by renaming it as zip, and uncompress.

On Mac, textutil will enable you to create xml files from other formats. Unfortunately, pdf is not one of them. https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/textutil.1.html

Maybe DynaPDF from MBS can extract PDF content ?

DynaPDF from MBS can definitely help extract the text from the PDF file. But there will still be a fair bit of work to generate the HTML and other files needed to create a valid epub. This can be moderately difficult if you are working with simple streaming text, with little or no formatting, but it gets much more involved if you need to convert complex pages such as textbooks, with images, callouts, and text boxes. If you just need to generate simple epubs, you may just want to use one of the many available tools.

If you’re not against installing some 3rd party software, Calibre has a command line interface: http://manual.calibre-ebook.com/generated/en/cli-index.html

My experiments with epub show very demanding specifications anyway. The slightest error in XML and the epub becomes unusable. As for translating complex typography, I believe it confines to an art more than any simple programmatic conversion.

I maybe missing something, but most ebook readers support PDF anyway.

If you’re using Apple iBooks Authoring tool you simply can drag and drop PDF files into your canvas…

Hi Forum,

sorry for not having replied to your answers earlier.
Perhaps, I should explain my problem more precisely.

At the time being, I create a multi-page pdf file from several TIF files.
Each page contains exactly one image.

What I need now ist to create an eBook with the same content as my pdf file.

I learned that an eBook is basically a pdf file, extended by some DRI stuff.
For my purpose, I don’t need any DRI protection, as the provided eBook can be
shared arbitrarily.

Read the specifications of the epub format, which is the most accepted today, I linked to above.

It is NOT “basically a pdf”. It is XML in a zip shell.

Actually, it is probably pretty straightforward to create an epub from your tiff files using Xojo, then pack them using zip, and rename the archive *.epub.

On Mac zip is part of the system. On PC, you will need a third party tool to pack the zip archive.

You can also read https://en.wikipedia.org/wiki/EPUB