Step 1. Download Doc Converter COM
- Please download and install PDFcamp Printer v2.3 and DocConverter COM from our website.
- Please unzip "doc2pdf_com_trial.zip" package to a folder, and run "install_as_exe.bat" file to install the DocConverter COM into your system, then you can run HTML2PDF.exe from MS Dos Windows.
- When you need to
Please note when converting this kind of HTML file, you need wait more than 10000 millisecond before convert such HTML files). By the above example, you can created PDF from this kind HTML file without any problem.
- When you need to run the conversion from PHP code, please refer to the following code template:
Create PDF file,
Set PdfCreator = New PDFOUTLib.PdfCreator
PdfCreator.HTML2PDF = "C:\sample.html"
PdfCreator.FileName = "C:\sample.pdf"
PdfCreator.HeadersFooters = "off"
PdfCreator.paperType = 6 '//7 is A4 paper, 6 is A3 paper
While PdfCreator.StillRunning = 1
Set PdfCreator = Nothing
Debug.Print "C:\sample.html -->C:\sample.pdf"
$url = "http://www.verypdf.com";
$path = "C:\\test.pdf";
$com = new COM("PdfOut.PdfCreator");
$com->Doc2PDFCommandLine("\"$url\" \"$path\" \"paperType=0,PrintHTMLBackground=yes,overwrite=yes\"");
By this COM version library, we can create PDF from HTML with Flash images (graphs/charts/etc) without any problem. During the using, if you have any question, please contact us as soon as possible.