This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Don't want "Convert to pdf" link to appear IN the pdf

DrBB wrote on 2013-08-21:
We've got a set-up where we want a person to be able to make a certain donation and receive a personalized PDF certificate in return. One way to do it would be to have the donation acknowledgment page have a "Get your Certificate" link that would POST the personalization data to a php page formatted as the certificate, and use pdfcrowd to do the conversion.

In demo mode, it would seem the only way to do that is to have a "Convert this page to a PDF" link on that terminal php page, but the link itself then gets included on the PDF. This isn't acceptable because we want the PDF to look like a stand-alone document you could print out, frame etc. Is it possible to code the whole sequence so the POST data populates the page, the conversion sequence takes place automatically and the "Download/Save PDF" box triggers when they hit the page? Maybe someone can point me to an appropriate tutorial?

DrBB wrote on 2013-08-21:
Ok, nevermind--I found the API page and downloaded the library file.
support wrote on 2013-08-23:

If you use the API, your application can generate the "PDF version" of your HTML without the "Save To PDF" button.

Another way to remove some elements in the final PDF output is to use the @print media rule. For example you can add the following to your stylesheet:
@media print { .no-print {display:none} }

and then set the "no-print" class on the elements you want to remove:
<p class="no-print">Do not print this to PDF</p>

To use the print version of the page when printing to PDF

1/ Save to PDF Link - add the use_print_media parameter to the URL:

2/ HTML to PDF API: use the usePrintMedia API function.