HTML/WEB 2 PDF Made Easy using http://www.freepdfconvert.com/

Most of us know about the free web2pdf service offered by pdfonline but today I found http://www.freepdfconvert.com 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 http://www.freepdfconvert.com. 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

freepdf

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)

http://web2pdf.freepdfconvert.com/HTMLtoPDFTemplate.aspx?
cURL=www.google.com
&author=
&subj=
&title=
&app=http://www.freepdfconvert.com
&keywords=&
allowcpy=&
allowmodif=
&allowprn=
&keylen=
&userpass=
&ownerpass=
&preservelinks=yes
&compress=flate
&marginleft=
&marginright=
&margintop=
&marginbottom=
&psize=
&porient=
&ctype=
&allowscript=yes
&outputmode=link

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:

WordPress.com Logo

You are commenting using your WordPress.com 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