Commercial HTML to PDF conversion needed

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Commercial HTML to PDF conversion needed

Post by alex.barylski »

I have tried every PHP PDF solution I can find and none work 100% on the data I need them to.

I need something commercial, so I can report bugs and get answers fast if nessecary. Preferably Linux based, but Windows might work, as I can install the software on a Windows box and wrap the software with a Windows based web service which my Linux software can then call.

I have googled for HTML to PDF(very important not just a PDF API - as I need to easily transform some complex tables into PDF) converter but everything seems to be Windows components or applications which do not support CLI, which a web service would probably need.

Just incase I've missed something, does anyone know of anything?

Cheers,
Alex
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Commercial HTML to PDF conversion needed

Post by Jonah Bron »

I might be being really stupid right now, but Adobe Acrobat can convert HTML to PDF...
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Commercial HTML to PDF conversion needed

Post by alex.barylski »

So does OpenOffice and a plethora of other applications.

I need to be able to use this program/library programmatically, to build a PDF from HTML document an archive it in a database; again programmatically.

I'm hoping to find a little PDFConverter tool (Windows with a CLI or Linux variety) which I can invoke, request to generate a PDFfile from a web page, then have the PDF contents returned to me for archiving.

Cheers,
Alex
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Commercial HTML to PDF conversion needed

Post by Jonah Bron »

I knew it! :D

Knowing you already searched Google, I looked it up on Sourceforge.net. Ironically, the second one is written in PHP.

https://sourceforge.net/projects/pdfizer/
https://sourceforge.net/projects/html2fpdf/
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Commercial HTML to PDF conversion needed

Post by alex.barylski »

I was really hoping for a paid for, commercial solution. The second you linked to is almost always first when googling, which is what I am using now and it fails to generate proper PDF on occassion so I need something a little more professional.

Cheers,
Alex
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Commercial HTML to PDF conversion needed

Post by Weirdan »

PCSpectra wrote: I have googled for HTML to PDF(very important not just a PDF API - as I need to easily transform some complex tables into PDF) converter but everything seems to be Windows components or applications which do not support CLI, which a web service would probably need.
Why wouldn't you just invoke firefox programmatically and ask it to print to PDF (using something like this: http://sites.google.com/site/torisugari ... lineprint2)?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Commercial HTML to PDF conversion needed

Post by alex.barylski »

While that is an interesting solution, unfortunately I need it done in PHP as I need to save the PDF to database everytime a change of the master document(s) are changed.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Commercial HTML to PDF conversion needed

Post by Weirdan »

So you were ok with running some binary (even wrapping it into webservice) but once the binary is firefox you suddenly don't want to run it? How come?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Commercial HTML to PDF conversion needed

Post by alex.barylski »

i'm running debian and firefox would probaly be complicated to install plus it's heavier than other CLI converters I've played with
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Commercial HTML to PDF conversion needed

Post by Jonah Bron »

(Pardon me if I'm being presumptuous)

Complicated? Don't you just extract the tar.bz?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Commercial HTML to PDF conversion needed

Post by alex.barylski »

I don't know to be honest I have very little experience in linux outside of setting up simple daemons, like AMP, Postfix, SSH, etc.

Firefox is a Windows application and might require installing things like X, Gnome, etc. Using Ubuntu is out of the question, it's a web server and I would hate the idea of running all that extra software just to use firefox when there are CLI utilities that convert HTML to PDF.

Plus, ideally, a CLI tool would give me more option in building a PDF, such as encryption, headers, etc.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Commercial HTML to PDF conversion needed

Post by Jonah Bron »

alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Commercial HTML to PDF conversion needed

Post by alex.barylski »

Doesn't hurt but I found a linux/windows binary that does an excellent job: HTMLDoc.org
Post Reply