[geeks] Text to PDF (was Re: I need an HTML to PDF converter)

Brian Dunbar brian.dunbar at liftport.com
Wed Feb 22 11:55:27 CST 2006


Sheldon T. Hall wrote:
> Folks-
> 
> I need a converter that will take HTML and spit out PDF files, do it from
> the UNIX command line, as a batch process.  There will be hundreds of files
> to convert per day, so it needs to be amenable to running from a shell
> script without any user intervention.

How odd.  I was looking a problem yesterday with similar intent.

We have a form on a web page, currently PHP.  We'd like to take their
Name, slam that into a PDF file with legal boiler plate around and fire
it back at them - by their own request of course!

It looks like a way would be to use PHP to build the text - with the
variable buried in it - then use enscript to create the PS from text,
then ps2pdf for the PDF file.

PHP > *text_file* > enscript > *PS_file > PS2DF > *PDF_file*

Making life complicated the boiler plate has it's own font, the headers
another, and several sections are in bold with underline.

Am I guilty of complicating this process?

-- 
Brian Dunbar
System Administrator
Liftport

brian.dunbar at liftport.com
aim: bdunbar1967

this email is: [ ] bloggable [x] ask first [ ] private

Remember.
But move forward, too. Light a candle, yes. But also drive a rivet.
~Lileks



More information about the geeks mailing list