HTML/WEB 2 PDF Made Easy using

Most of us know about the free web2pdf service offered by pdfonline but today I found out smarts PDFonline’s service in the sense it can be easily integrated into any web page with out letting the user as if we really use In their web site they have a form to key in the URL of the web page which will be converted to PDF on the fly and the form looks like the one below


I said we can easily integrate this into any web application but how? the real magic is behind the URL of the controller page and query string params they use for conversion, it is pretty open and not documented. They are using the the target URL as (for easy readable I split the params)

I didn’t explore much except just two things in the param i.e. cUrl and outputmode.

cURL = Specify the target webpage

outputmode = link / stream

If you specify as “link”, then the generated pdf file rendered as hyperlink and we need to manually click for downloading the pdf but if we specify as “stream” then it will show up the download dialog window.

The output mode is the prime factor in this free service which made the PDFOnline’s service to lower rank. The quality of the generated PDF document is also really good.

Using simple JavaScript and Iframe we can easily integrate this service into any web site for generating PDF document out of dynamically generated web pages (i.e ASP.NET, JSP, PHP etc.) as long as this service is visible (I am not sure how they made it open and I suspect whether it is a security hole!)

I will post a simple web app using this tool soon.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s