HOME
Desing PDF online
|
BETA service - Integrate PDF on your site easily and without using PHP or additional files
|
Remember: The code must be run from the server domain and not from a local server programming (No localhost)
|
HTML to PDF into a new page
|
<form method="post" target="_blank" action="http://pdfservices.net/gateway.php"> <input type="hidden" name="apikey" value="..............."/> <!-- your apikey of pdfservices.net--> <input type="hidden" name="textinputs" value="true"/> <!-- allow paint forms object , you can create a pdf with fiedls and write inside as user --> <input type="hidden" name="usemedia" value="false"/> <!-- use the media type css: @media display {, @media print { --> <input type="hidden" name="margin" value="2"/> <!-- margins page --> <input type="hidden" name="utf8" value="UTF-8" /> <input type="hidden" name="forcedownload" value="true" /> <!-- Use for download directly (no open in browser) --> <input type="hidden" name="autoprint" value="true" /> <!-- Use for autoprint on show --> <input type="hidden" name="w" value="210" /> <!-- width of document --> <input type="hidden" name="h" value="297" /> <!-- height of document --> <textarea name="html" rows="5" cols="25"> <!-- html to submit --> <h3>My title</h3><hr/><p>your text</p> </textarea> <input type="submit" /> </form>
|
HTML to PDF into a new page (SHORT CODE)
|
<form method="post" target="_blank" action="http://pdfservices.net/gateway.php"> <input type="hidden" name="apikey" value="..............."/> <!-- your apikey of pdfservices.net--> <textarea name="html" rows="5" cols="25"> <!-- html to submit --> <h3>My title</h3><hr/><p>your text</p> </textarea> <input type="submit" /> </form>
|
URL (web page) to PDF into a new page
|
<form method="post" target="_blank" action="http://pdfservices.net/gateway.php"> <input type="hidden" name="apikey" value="..............."/> <!-- your apikey of pdfservices.net--> <input type="hidden" name="textinputs" value="true"/> <!-- allow paint forms object , you can create a pdf with fiedls and write inside as user --> <input type="hidden" name="usemedia" value="false"/> <!-- use the media type css: @media display {, @media print { --> <input type="hidden" name="margin" value="2"/> <!-- margins page --> <input type="hidden" name="utf8" value="UTF-8" /> <input type="hidden" name="forcedownload" value="true" /> <!-- Use for download directly (no open in browser) --> <input type="hidden" name="autoprint" value="true" /> <!-- Use for autoprint on show --> <input type="hidden" name="w" value="210" /> <!-- width of document --> <input type="hidden" name="h" value="297" /> <!-- height of document --> <input type="text" name="url" size="50" value="http://www.pdfservices.net" /> <input type="submit" /> </form>
|
HTML to PDF into iframe (From a text link)
|
<iframe name="pdfdoc" id="pdfdoc" width="540" height="95" allowtransparency="no"></iframe> <a href="http://pdfservices.net/gateway.php?apikey=YOUR-PDFSERVICES-API-KEY&action=htmlpdf&html=MY HTML CODE" target="pdfdoc">Print</a>
|
JavaScript Function to print entire html object direct
|
<script language="javascript"> function printHtmlItem(obj_id){ var obj,hframe; if(document.getElementById(obj_id)){ obj=document.getElementById(obj_id) }else{ if(obj_id){obj=obj_id}else{return;} } hframe = document.createElement('iframe'); hframe.style.display='none'; hframedoc = document.body.appendChild(hframe); hframedoc.src = "http://pdfservices.net/gateway.php?autoprint=true&html="+obj.innerHTML; } </script>
|
Arguments : Values ------------------------------------- apikey: [code] html: [html code] url: [url page] [OPTIONAL] textinputs: true/false usemedia: true/false margin: 0 to 150 (mm) autoprint: true/false w: [mm] h: [mm] forcedownload: true/false utf8: force encoding to: UTF-8,iso-8859-1,forceutf8, [NONE] (use your encode)
|