Welcome to HiQPdf Demo
HTML to PDF
HTML to PDF Converter Demo
Merge Multiple HTML to PDF
PDF Headers and Footers
HTML Table Header and Footer
Control PDF Page Breaks with CSS
Auto Create Outlines and Links
Auto Create Table of Contents
Auto Create Tagged PDF
Set Conversion Triggering Mode
Select Media Type for Rendering
Web Fonts Advanced Support
Convert Current View with Form Data
Convert Another View with Form Data
PDF Viewer Settings
PDF Security Settings
PDF Digital Signatures
Set HTTP Headers Demo
Set HTTP Cookies Demo
GET and POST Requests Demo
HTML to Image
In this demo you learn about the conversion triggering modes. There are two conversion triggering modes: Auto and Manual.
In the sample script we provide, a ticks counter is incremented each 30 ms after the document was loaded.
When the triggering mode is set to manual and the the ticks count reached exactly 100 the hiqPdfConverter_startConversion() is called.
When the triggering mode is Auto the conversion will start immediately after the wait time expired.
HTML Code
<html> <head> <title>Conversion Triggering Mode</title> </head> <body> <br /> <br /> <span style="font-family: Times New Roman; font-size: 10pt"> When the triggering mode is 'Manual' the conversion is triggered by the call to <b>hiqPdfConverter_startConversion()</b> from JavaScript.<br /> In this example document the hiqPdfConverter_startConversion() method is called when the ticks count reached 100 which happens in about 3 seconds. </span> <br /> <br /> <b>Ticks Count:</b> <span style="color: Red" id="ticks">0</span> <br /> <br /> <!-- display HiQPdf HTML converter version if the document is loaded in converter--> <span style="font-family: Times New Roman; font-size: 10pt"> HiQPdf Info: <script type="text/javascript"> // check if the document is loaded in HiQPdf HTML to PDF Converter if (typeof hiqPdfInfo == "undefined") { // hiqPdfInfo object is not defined and the document is loaded in a browser document.write("Not in HiQPdf"); } else { // hiqPdfInfo object is defined and the document is loaded in converter document.write(hiqPdfInfo.Version); } </script> </span> <br /> <script type="text/javascript"> var ticks = 0; function tick() { // increment ticks count ticks++; var ticksElement = document.getElementById("ticks"); // set ticks count ticksElement.innerHTML = ticks; if (typeof hiqPdfConverter_startConversion == 'function' && ticks == 100) { // trigger conversion ticksElement.style.color = "green"; hiqPdfConverter_startConversion(); } else { // wait one more tick setTimeout("tick()", 30); } } tick(); </script> </body> </html>
Conversion Triggering Mode:
Auto
Manual
Wait Time:
sec