SPUG: html->pdf conversion?

Fred Morris m3047 at inwa.net
Tue Oct 21 19:14:52 CDT 2003


At 4:35 PM 10/21/03, Alan wrote:
>Hey folks.  I'm working on a project that will attempt to convert HTML
>to PDF.
>
>I found I can do this with html2ps and ps2pdf, and it works fine until
>you want fonts that aren't the standard serif and sans-serif.

Is html2ps including the fonts? Turn this off, and see if you can include
them in the ps->pdf phase instead. Ghostscript should give you more
control.. although the pdf driver is, yeah, a little bit sucky.

I thought html2ps had options for page size, etc.? Or maybe you have to
create your own prologue. Never fiddled with that.

>[...]
>After a bit of searching I found
>ttf2pfa, which works, but the results are, in a word, "sucky" :)  They
>appear to be very low res and very block.

1) Make sure you're using real, scalable fonts.. and including them as such.

2) Think carefully about the resolution that you are converting for, both
html->ps and ps->pdf... likewise think carefully about the device you are
converting for.

3) They're "designer-types" and they won't spring for a legit copy of
Acrobat? Hrmm. Acrobat comes with *the* ps to pdf convertor, and it will do
what you want provided you use real scalable fonts, etc. etc. (The gizmo is
called Distiller, and it has loads of options.) Do it right and you will
get really sharp output; do it wrong and the results are, well, sucky. For
that matter, Aladdin sells the latest version of GhostScript... they don't
give it away! (never have, nothing new in that arrangement)

4) As a pre-press consideration, you may really want to not include those
fonts, and instead pass them along to the printing shop so they can be
downloaded to the RIP.

5) There are other artful ways of creating PostScript font routines, but
it's more than a quick e-mail on a Perl list.

6) Sharper output almost invariably means larger size.

7) PostScript is a programming language; it's similar to Forth. :-p


Whoever said prepress was WYSIWYG really didn't know much about hardware...
either that or their idea of a notebook comes with crayons as a pointing
device. There are shops which make their livings getting output
press-ready...

--

Fred Morris
fredm3047 at inwa.net (I-ACK)





More information about the spug-list mailing list