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

include print button in HTML converted to PDF

Daniel_2112 wrote on 2015-11-02:
Hi guys,

I have an HTML file that I have converted to a PDF via the API. I have a <button> element that tells the browser to print the page. The code is below. It works with the HTML but does not work once the HTML is converted to a PDF.

<input type='button' id='hideme' onClick='window.print();' value='here'>

Converted PDF: (DOESN'T WORK)

Is there some sort of other PDF specific code I need to include instead of the button I've included? Or pehraps have it as an actual piece of JS rather than in the buttons inClick="".

Please respond asap, thanks guys.

Daniel_2112 wrote on 2015-11-02:
I've had to make some amends to the voucher/index.html file as its a staging/live version.

And so I've had to remove the <input type='button' id='hideme' onClick='window.print();' value='here'>.

support wrote on 2015-11-03:
Hello Daniel,

A button (or a link) that triggers a Javascript action will not work in PDF, our software does not support this.