Ddoc to PDF
Walter Bright
newshound2 at digitalmars.com
Mon Oct 18 21:37:52 PDT 2010
Andrei Alexandrescu wrote:
> There's no need for all that. It took me a short time to produce a set
> of macros that would generate LaTeX files from ddoc. I'm sure I have it
> somewhere, or I could rewrite it. From there you get to produce high
> quality PDFs.
I think you're right and that's the way we should do it.
On the other hand, just for fun I wanted to see if I could read a paperback I
got from the thrift store on my ipod. I sliced the back off, and ran it through
a scanner to create an OCR'd pdf. Loading the pdf into my ipod didn't work, as
it was 25 megs and so far, the only way I've figured out how to get pdf's to the
ipod is via email.
Trying a small sample did work, but the page image on the ipod was just too
small to read. I had to use a magnifying glass.
So I loaded the pdf, did a select all, and wrote the text out to a simple text
file. Emailing the text file worked, but imail has a crappy text file reader. No
good.
Next I downloaded and compiled the text2pdf.c file. Trying it crashed. Buffer
overflow!! Bumped all the buffer sizes way up, and it worked. Emailed it to the
ipod, saved it as an "ibook", and I could read it.
The pages were still too big, though, and the ibook reader made zooming the
pages a miserable experience. (Apple didn't get everything right.)
I downloaded the pdf spec and figured out how to set the page margins to zilch
(don't need page margins on the ipod), about 11 lines by 60 characters seems to
work fine. Reset the font to Times-Roman. Now it works perfectly!
The only problem is the book itself sux. Oh well!
More information about the Digitalmars-d
mailing list