views:

29

answers:

1

I have a lot of different sites written in PHP (Drupal) and more and more often clients ask me to create PDFs of various lists, product descriptions and so on.. I've been using dompdf and other pdf libraries but they are a pain to use and have a very limited functionality.

Are there any services out there that'll let me generate a PDF file from a URL and let the user download the result? That would definitely save my day :)

Best regards, Thomas

A: 

If you are trying to convert html to PDF, then there are a couple of services out there which can do that for you (search), but from the top of my head a2ps does a pretty ok job. The basic idea if that if you can generate PostScript from your source, then creating a PDF is not an issue.

If you are looking for a more feature full library then iText can do it (Java though and not free for commercial use).

Martin Wickman
Thanks for your reply. The problem is that I just need a simple service like this one: 1) I make a request to in example: http://www.1337html2pdf.com/?url=stackoverflow.com2) The reply is a direct file download of the generated PDF file og the stackoverflow.com site. Basically it's the same thing as just doing this on my Mac: 1) Open a web page page with my browser. 2) Choose "Print". 3) Choose "Save as PDF". I need this as a transparent service and pricing really isn't an issue.There are sites out there (but they're not services):http://www.pdfonfly.com/http://pdfmyurl.com/
kulvik
Can't you use something like http://html2pdf.seven49.net/Web/en/Support/Parameters_for_html2pdf.htmIt seems to do what you want, ie do a request containing the url you want to convert and it returns the PDF. A simple `curl` call should do the trick for you?
Martin Wickman
Yeah, i'll try that. Thanks again for your replies.
kulvik
If it works out for you, please mark this as the correct answer.
Martin Wickman