Tag Archive: pdf

To Digital in a Day: Curtains Down

Sun 3:30 AM

Tinkering around with html2ps. Discover that it works okay if every higher-bit character is html-entitied.

Did some search and replace in MacVim. (Note: could also have simply used HTML Entities for Ruby, and will do so in the future.)

Sun 3:54 AM

And now we have a PDF with clicky-links as well. The full six!

To Digital in a Day: Act III

Sat 9:30 PM

This book needs a cover; that would have been a nice tutorial on Covers for All Book Formats More or Less, but that’s a blog post for another day.

Time for Mobipocket.

mobigen run on the Epub file finishes in a minute. File checks out.

Sat 9:32 PM

Wondering what format to do next.

Oh yes, PDF. Which means a detour via html2ps and then Ghostscript’s ps2pdf.

This is a little more complicated.

Especially since html2ps is segfaulting for some reason on my Mac.

Sat 10:02 PM

Removed incidental cause of the seg fault, will be fixing it for real tomorrow or sommat.

Or… not. html2ps doesn’t deal with raw utf8; it lives on ISO encoding. Like the rest of perl. No Ruby (defaults to utf8) equivalent around.

Sat 10:24 PM

The other option I know of, wkpdf, needs a consolidated HTML file.

So… let’s take the worked original file, and add anchors. MacVim again!

This time I’m running short perl filters against the text directly in the editor, then using grep to grab the anchors and more regular expression/replace to create the links.

Incidentally, this also gives us the one-file HTML version with a table of contents.

Sat 11:09 PM

Well, I ended up enabling the web server with PHP5, increasing memory limits and PCRE backlimit, to try to run html2pdf, the PHP version. But most of my problems stem from the document being too large.

At this point, I can already generate every other format. Except for PDF with hyperlinks (PDF without such links I can do). Which has always been a bit of an Achilles heel for me.

By the way, apparently the Mac these days comes with textutil, so I might have been able to save a bit of time earlier in Act I. Hey, it can convert to… Word document, Open Office Document Text, …. hang on….

Nah, doesn’t preserve inter-text hyperlinks.

Sat 11:20 PM

Let’s just get all the other mobile formats out of the way.

Using calibre’s any2lrf, we get a valid Sony Reader file in under two minutes.

Using calibre’s oeb2lit, we get a valid Microsoft Reader file in under two minutes.

It takes me longer to type all this down for you and to locate my bookmark to the calibre site, actually.

Sat 11:29 PM

The state of affairs:

  • Valid Epub.
  • Valid Mobipocket (MOBI).
  • (Really) Valid HTML with linkage.
  • Valid Sony Reader.
  • Valid Microsoft Reader.

All in one day. Actually, counting up the time, less than one day.

Shadow Unit: Episode 2×01 eBootleg

cover-2x01-blog

Yes. It is here.

Update! Ask and ye shall sometimes receive, if it is within my power. A PDF version is now available, with clicky links and everything. Please see Locations below.

Update #2! No one asked, but I created an LRF file for older Sony Readers that can’t read ePub files. I don’t have a Sony Reader, though, so I’m not sure how it turns out; I think the formatting might actually look different than the corresponding ePub, even though they’re all from the same source files….

Note: Remember: these are an unofficial—if legal—conversion. Both the original and these conversions are licensed under a Creative Commons Attribution-Noncommercial 3.0 license.

Schedule: I plan on doing the episodes as individual files, with “up to now” season compilations as a separate, updated ebook file. Eventually the individual episodes will expire (but that won’t be until season end) and there’ll just be the Season 2 Ebook.

Exciting Features:

  • Episode 1 in mobile reading form.
  • Pretty cover for your ebook device/software.
  • Typographical quotes and dashes!
  • All episode-specific easter eggs and extras included.

Locations:

If you own a Kindle or other device/program that can read Mobipocket files (.MOBI):
  Shadow Unit - 2x01 - Lucky Day (Kindle/Mobipocket) (153.9 KiB, 442 hits)

If you own a Sony PRS-505 or later, Adobe Digital Editions, or some other device/program that can read EPub files (.EPUB):
  Shadow Unit - 2x01 - Lucky Day (Epub) (344.3 KiB, 292 hits)

If you own anything that can read a PDF file (bonus if it can deal with links in a PDF file):
  Shadow Unit - 2x01 - Lucky Day (PDF) (135.5 KiB, 319 hits)

If you own an older Sony that cannot read EPub files and don’t want to use the PDF above1:
  Shadow Unit - 2x01 - Lucky Day (Sony) (157.6 KiB, 280 hits)

Enjoy!

Need Season 1?

It’s currently only available for the Kindle, but can be converted via calibre for Sony. (It’s a huge file, relatively speaking, for an ebook).

  Shadow Unit: Season 1: Kindle/Mobipocket (1.5 MiB, 1,519 hits)

Screenshots!

Below the cut.

Click here to read more »

  1. It’s not form-factored for a small screen, still need to figure out how to do that with the tools I have on hand. []

Perfecting (Simple) PDF Conversion to EPub and Mobipocket

pdf-icon

Problem: Convert PDF to reflowable text, preferably HTML.

Why: This is because text that reflows based on the size of the screen, or the size of the font, or the length of a page (or indeed, without the concept of a page) is what suits mobile ebook readers, with smaller screens, best.

Apologies for two Geekery posts in a row. The rest of the discussion is under the fold.

Click here to read more »