What is a good web API to convert web pages to PDF?
-
I'm trying to automate a workflow to archive web content to PDF files on the cloud. Here are some of the options I found and are mentioned by other users: PDFmyURL - http://pdfmyurl.com/html-to-pdf-api Seems to have a lot of options and supports POST and GET requests. Does not seem to have a free plan other than for special institutions (non-profit etc.) HTM2PDF - http://www.htm2pdf.co.uk/html-to-pdf-api Supports GET and POST requests - works with a credit system, has servers in different continents JolliPrint - shut down in 2014 ConvertAPI (http://www.convertapi.com/web-pdf-api) but it seems to have stopped working (at least the free version), gives blank output. pdfcrowd http://pdfcrowd.com/html-to-pdf-api, but there are a few snags: the REST API requires POST requests, which rules out ifttt integration (*), and also it offers only 100 credits total for a free account. Is there anything else which offers i) free access without a hard limit (reasonable monthly caps are fine), ii) output of reasonable quality for personal archival purposes, and preferably iii) responds to GET requests in the form of plain ol' URL strings? Thanks. (*) Now that Zapier's free plan is somewhat usable, I could use their webhook to call the API. However, Zapier does not yet have API integration with services I use like Google Reader and Pocket, which ifttt does. Reader can provide public feeds so that's not an issue, Pocket however provides very limited feeds, which means that I'll have to hack a Pocket->ifttt->text file on Dropbox->Yahoo! Pipes->RSS feed->Zapier->webhook->Dropbox workflow, and at this point I'm wondering if it'll be less effort to just write the code myself and host it on a free PaaS plan like CloudFoundry o_O
-
Answer:
There are a bunch of options* for converting a web page to a PDF. A number have already been mentioned in the question and other answers. One thing to consider is that, since a number of these have come and gone, it might make sense to pay for a service you use in hopes that it will be more likely to continue providing the service. That said, PDFMyURL seems to work well: http://pdfmyurl.com/support/index.jsp#API It's incredibly simple, yet has a number of options. *ProgrammableWeb, where I work, lists about 20 in its directory: http://www.programmableweb.com/apitag/pdf/1?sort=date
Adam DuVander at Quora Visit the source
Other answers
Recently I was facing the same issue and solved it something like described above, as the by-then available services featuring PDF conversion was too expensive versus the cost to integrate. Here are the tools we used: Wkhtmltopdf for the actual conversion process - should run directly on a somewhat new Ubuntu server installation. It understands most of modern HTML+CSS quite well. Node.js for invoking the actual conversation process and uploading the created files to Amazon S3. The whole script should be far less than 100 LOC. I think that there is a working example of node.js + wkhtmltopdf online. Finally, Zeromq or rabbitmq to act as middleman between your current application and node.js to make it super easy to integrate things and keep track of your conversation jobs with needed durability, regardless of what programming language your app is built with.
Joakim Br
You might also consider using the Saaspose PDF API (http://saaspose.com/). It has low free limits for developers but I do not believe it will support requirement #3 (simple GET request to convert).
Dave Goldberg
You might want to check out the following API providers PDFmyURL and HTM2PDF, which both offer a very complete API to convert web pages to PDF including full CSS2 and JavaScript, but also many layout options and options to apply a watermark or password to the resulting PDF. http://www.htm2pdf.co.uk - has a HTML to PDF API as well as a full blown SDK that saves you a lot of programming http://pdfmyurl.com/html-to-pdf-api -PDFmyURL offers a very extensive web to PDF API with a lot of options. Their pricing is also very transparent as opposed to many other providers. They charge in number of PDFs/month instead of credits that nobody understands.
Retze Faber
Try http://selectpdf.com/html-to-pdf-api/ from SelectPdf. SelectPdf HTML To PDF Online REST API is a professional solution that lets you create PDF from web pages and raw HTML code in your applications. The API is easy to use and the integration takes only a few lines of code. SelectPdf HTML To PDF API can be used from any programming language. Here are some samples for http://selectpdf.com/web-html-to-pdf-rest-api-for-java-samples/ and http://selectpdf.com/web-html-to-pdf-rest-api-for-php-samples/.
Tom Williams
Peardoc (http://www.peardoc.com) offers web API for HTML to PDF conversion.
T E Gautham
use nodeJS on a server using the phantom bindings:1 - npm install phantom2 - open a file called webtopng.js with:var phantom = require('phantom');if (process.argv.length !== 4) {console.log('Usage: webtopdf.js <some URL> <output>');process.exit();}var address = process.argv[2];var output = process.argv[3];var sitepage = null;var phInstance = null;phantom.create().then(instance => {phInstance = instance;return instance.createPage();}).then(page => {sitepage = page;return page.open(address);}).then(status => {console.log(status);return sitepage.property('content');}).then(content => {console.log(content);sitepage.render(output);sitepage.close();phInstance.exit();}).catch(error => {console.log(error);phInstance.exit();});3 - use it with:node webtopdf.js https://docushow.com docushow.png
Laurent Denoue
Related Q & A:
- What is a good video quality to convert to?Best solution by Super User
- How can I pick a good web cam?Best solution by forbes.com
- What is a good web page to apply for a job?Best solution by Yahoo! Answers
- What are some good web design trends for 2010?Best solution by Quora
- What is a good free internet web blocker?Best solution by www1.k9webprotection.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.