Welcome to HiQPdf Demo
HTML to PDF
HTML to PDF Converter Demo
Convert Many HTMLs to PDF
HTML Fitting and Scaling Options
Convert a Selected HTML Region
Headers and Footers in PDF
Convert Web Pages Preserving State
Set PDF Pages Background
HTML Elements Position in PDF
Set Conversion Triggering Mode
Auto Create Outlines and Links
Auto Create Table of Contents
Auto Create PDF Forms
Repeat Table Header and Footer
Control PDF Page Breaks with CSS
Select Media Type for Rendering
Web Fonts Advanced Support
PDF Security Settings
HTML to Image
HTML to SVG
PDF Forms
Create and Submit PDF Forms
Fill and Save PDF Forms
Set an Open Action in PDF
Create Outlines and Links in PDF
Create File Attachments in PDF
Add HTML Objects in PDF
Add Text Objects in PDF
Add Image Objects in PDF
Add Graphic Objects in PDF
PDF Document Security
Add Digital Signatures in PDF
Edit PDF Documents
Merge PDF Documents
Extract Text from PDF
Search Text in PDF
Extract Images from PDF
Rasterize PDF Pages to Images
Convert PDF to HTML
In this demo you learn about the conversion triggering modes. There are three conversion triggering modes: Auto, WaitTime and Manual.
In the sample script we provide, a ticks counter is incremented each 30 ms after the document was loaded. When the ticks count reached 100 in about 3 seconds the startConversion() is called.
When the triggering mode is Manual the call to startConversion() will trigger the conversion.
When the triggering mode is WaitTime a wait time of 5 seconds is sufficient to allow the ticks count reach 100.
When the triggering mode is Auto the conversion will start before the counter reached 100.
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 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.getVersion()); } </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 (ticks == 100) { // trigger conversion ticksElement.style.color = "green"; if (typeof hiqPdfConverter != "undefined") hiqPdfConverter.startConversion(); } else { // wait one more tick setTimeout("tick()", 30); } } tick(); </script> </body> </html>
Conversion Triggering Mode:
Auto
Manual
WaitTime
Wait Time:
sec