Royalty free HTML to PDF Converter  Home  HTML-Converter  Command-Line  Document  FAQ

Royalty free HTML to PDF Converter SDK

HTML to PDF Converter doesn't depend on print drivers it renders web pages quickly and accurately. HTML to PDF Converter is the right HTML converter solution to be setup on web-servers, used from service, launched within other programs from the command line. With VeryPDF HTML Converter, you can also use batch converting if you deal with large amount of files.

VeryPDF HTML to PDF Converter allows you to dynamically convert HTML to PDF - any URL, HTML file, or MHTML file to PDF on the fly - while maintaining embedded styles. With VeryPDF HTML to PDF Converter, you can:

bullet Dynamically convert HTML to PDF to generate reports from HTML data.
bullet Transfer HTML form input into tamperproof PDF forms.
bullet HTML to PDF converter for the generation of PDF certificates, invoices, statements, and other documents on the fly from your website.
bullet Control PDF page size, orientation and page breaks, while adding dynamic headers, footers and page numbering in HTML to PDF conversion process..
bullet Generate multi-page PDF documents for faster display over the web.
bullet Secure PDFs containing HTML data using PDF encryption.

HTML to PDF Converter command line application can be called from within ASP, VB, VC, Delphi, BCB, Java, .NET and COM+ etc. program languages. It uses advanced techniques to allow efficient asynchronous multithreaded operations.

Complete list of supported conversions
EMF to PDF, PS (Postscript), TIF, TIFF, JPG, JPEG, GIF, PNG, BMP, WMF, EMF, PCX, TGA, JP2, PNM
WMF to PDF, PS (Postscript), TIF, TIFF, JPG, JPEG, GIF, PNG, BMP, WMF, EMF, PCX, TGA, JP2, PNM
RTF to PDF, PS (Postscript), TIF, TIFF, JPG, JPEG, GIF, PNG, BMP, WMF, EMF, PCX, TGA, JP2, PNM
HTML to PDF, PS (Postscript), TXT, TIF, TIFF, JPG, JPEG, GIF, PNG, BMP, EMF, WMF, PCX, TGA, JP2, PNM

C:\>C:\htmltools\htmltools.exe
VeryPDF HTML Converter v2.1
Web: http://www.verypdf.com
Email: support@verypdf.com
-------------------------------------------------------
Description:
Convert *.EMF, *.WMF, *.RTF files to PDF files
EMF to PDF,PS,TIF,JPG,GIF,PNG,BMP,WMF,EMF,PCX,TGA,JP2,PNM
WMF to PDF,PS,TIF,JPG,GIF,PNG,BMP,WMF,EMF,PCX,TGA,JP2,PNM
RTF to PDF,PS,TIF,JPG,GIF,PNG,BMP,WMF,EMF,PCX,TGA,JP2,PNM
HTM to PDF,PS,TXT,TIF,JPG,GIF,PNG,BMP,WMF,EMF,PCX,TGA,JP2,PNM
Release Date: May 30 2006
Usage: htmltools [options] <EMF-WMF-HTML-URL-RTF-file> [<PDF-PS-Image-file>]
  -width <int>   : Set page width to PDF file
  -height <int>  : Set page height to PDF file
  -bwidth <int>  : Set web browser's width for HTML conversion
  -bheight <int> : Set web browser's height for HTML conversion
  -xres <int>    : Set X resolution to image file
  -yres <int>    : Set Y resolution to image file
  -bitcount <int>: Set color depth for image conversion
  -rotate <int>  : Rotate pages, 90, 180, 270
  -margin <string>    : Set page margin to PDF file
        -margin 10          : Set margin to 10pt to left
        -margin 10x10       : Set margin to 10pt to left,top
        -margin 10x10x10    : Set margin to 10pt to left,top,right
        -margin 10x10x10x10 : Set margin to 10pt to left,top,right,bottom
  -view               : View PDF file after creation
  -append <int>       :
        -append 0: Overwrite if PDF file exists
        -append 1: Insert before first page if PDF file exists
        -append 2: Append to last page if PDF file exists
        -append 3: Rename filename if PDF file exists
  -postdata <string>  : Set the data to be posted to the URL. Use this function for some urls protected by forms.
  -producer <string>  : Set 'producer' to PDF file
  -creator <string>   : Set 'creator' to PDF file
  -subject <string>   : Set 'subject' to PDF file
  -title <string>     : Set 'title' to PDF file
  -author <string>    : Set 'author' to PDF file
  -keywords <string>  : Set 'keywords' to PDF file
  -openpwd <string>   : Set 'open password' to PDF file
  -ownerpwd <string>  : Set 'owner password' to PDF file
  -keylen <int>       : Key length (40 or 128 bit)
        -keylen 0:  40 bit RC4 encryption (Acrobat 3 or higher)
        -keylen 1: 128 bit RC4 encryption (Acrobat 5 or higher)
        -keylen 2: 128 bit RC4 encryption (Acrobat 6 or higher)
  -encryption <int>   : Restrictions
        -encryption    0: Encrypt the file only
        -encryption 3900: Deny anything
        -encryption    4: Deny printing
        -encryption    8: Deny modification of contents
        -encryption   16: Deny copying of contents
        -encryption   32: No commenting
        ===128 bit encryption only -> ignored if 40 bit encryption is used
        -encryption  256: Deny FillInFormFields
        -encryption  512: Deny ExtractObj
        -encryption 1024: Deny Assemble
        -encryption 2048: Disable high res. printing
        -encryption 4096: Do not encrypt metadata
  -unicode            : Enable Unicode conversion
  -rclbounds          : Use rclBounds instead of rclFrame
  -activex            : Enable ActiveX for HTML conversion
  -java               : Enable Java for HTML conversion
  -script             : Enable script for HTML conversion
  -bookmark <int>     : Create bookmark to PDF file
        -bookmark 1: Use short filename as bookmarks
        -bookmark 2: Use full filename as bookmarks
        -bookmark 3: Use short filename without suffix as bookmarks
  -mergepdf <string>  : Merge two PDF files into one PDF file
        -mergepdf "file1|file2|file3|...": Merge several PDF files into one
        -mergepdf "C:\filelist.txt"      : Merge PDF files from a .txt file
        -mergepdf "C:\*.pdf"             : Merge PDF files into one PDF file
  -burstpdf <string>  : Burst PDF file into single page PDF files
  -timeout <int>      : Set timeout in milliseconds for HTML conversion
  -delaytime <int>    : Set delay time in milliseconds for HTML conversion
  -htmllevel <int>    : Set link's level for HTML conversion
  -emfheight <int>    : Split a long EMF file by this height
  -nosplitimg         : Don't break images in HTML file
  -forcesplitemf      : Force split EMF file by emfheight
  -disablelinks       : Disable hyperlinks within HTML to PDF conversion
  -nocenter           : Don't center the contents in the PDF file
  -noempty            : Delete empty pages from PDF file
  -wtext <string>     : watermark on printed document
  -wtype <int>        : type of watermark
        0 : normal watermark
        1 : watermark on header
        2 : watermark on footer
  -wf <string>        : font name of watermark
  -wh <int>           : font size of watermark
  -wb                 : specify bold font
  -wi                 : specify an italic font
  -wu                 : specify an underlined font
  -ws                 : specify a strikeout font
  -wa <int>           : angle of watermark
  -wbox <string>      : a rectangle to output formatted text, it is only useul for "-walign" option, eg:
        -wbox "0,0,595,842"
        -wbox "0,0,612,792"
  -walign <int>       : set text align
        1 : left
        2 : center
        3 : right
  -wc <string>        : color of watermark,
        FF0000: Red color
        00FF00: Green color
        0000FF: Blue color
        HexNum: Other colors
  -wx <int>           : X offset of watermark
  -wy <int>           : Y offset of watermark
  -v                  : Print copyright and version info
  -h                  : Print usage information
  -help               : Print usage information
  --help              : Print usage information
  -?                  : Print usage information
  -$ <string>         : Input registration key
Example:
  htmltools.exe C:\in.emf C:\out.pdf
  htmltools.exe C:\*.emf C:\*.pdf
  htmltools.exe -margin 100x100x100x100 C:\in.rtf C:\out.pdf
  htmltools.exe -append 2 -width 612 -height 792 C:\*.emf C:\out.pdf
  htmltools.exe -append 2 C:\*.emf C:\out.pdf
  htmltools.exe C:\filelist.txt C:\out.pdf
  htmltools.exe -width 612 -height 792 C:\in.emf C:\out.pdf
  htmltools.exe -bwidth 100 -bheight 100 C:\in.emf C:\out.pdf
  htmltools.exe -append 1 C:\in.emf C:\out.pdf
  htmltools.exe -append 2 C:\in.emf C:\out.pdf
  htmltools.exe -subject "subject" C:\in.emf C:\out.pdf
  htmltools.exe -ownerpwd owner -keylen 2 -encryption 3900 C:\in.emf C:\out.pdf
  htmltools.exe -bookmark 3 C:\in.emf C:\out.pdf
  htmltools.exe -mergepdf "C:\1.pdf|C:\2.pdf|C:\3.pdf" C:\out.pdf
  htmltools.exe -mergepdf "C:\*.pdf" C:\out.pdf
  htmltools.exe -mergepdf "C:\filelist.txt" C:\out.pdf
  htmltools.exe "http://www.verypdf.com" C:\out.pdf
  htmltools.exe -htmllevel 1 "http://www.verypdf.com" C:\out.pdf
  htmltools.exe "http://www.verypdf.com" C:\out.ps
  htmltools.exe "http://www.verypdf.com" C:\out.emf
  htmltools.exe "http://www.verypdf.com" C:\out.jpg
  htmltools.exe "http://www.verypdf.com" C:\out.gif
  htmltools.exe "http://www.verypdf.com" C:\out.txt
  htmltools.exe "C:\in.html" C:\out.gif
  htmltools.exe -disablelinks "C:\in.html" C:\out.pdf
Add watermarks into PDF files:
  htmltools.exe -wtext "VeryPDF" "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wc "0000FF" "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wx 100 -wy 100 "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wtype 1 "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wtype 2 "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wtype 0 -wa 45 "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wf "Arial" "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wf "Arial" -wh 20 "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wf "Arial" -wh 20 -wb -wi -wu -ws "C:\in.html" C:\out.pdf
  htmltools.exe -wtext "VeryPDF" -wf "Arial" -walign 3 -wh 20 -wbox "0,770,612,792" "C:\in.html" C:\out.pdf

Download HTML to PDF Converter Command Line product,

Download

Purchase HTML to PDF Converter Command Line product,

Purchase

Example codes,

VB example code,
   
Private Sub Command1_Click()

        Dim i As Integer
        i = Shell("C:\htmltools.exe http://www.verypdf.com C:\out.pdf", vbNormalFocus)

    End Sub

VB.NET example code,


        Dim startInfo As System.Diagnostics.ProcessStartInfo
        Dim pStart As New System.Diagnostics.Process

        startInfo = New System.Diagnostics.ProcessStartInfo("C:\htmltools.exe http://www.verypdf.com C:\out.pdf")

        pStart.StartInfo = startInfo
        pStart.Start()
        pStart.WaitForExit() 'Your code will halt until the exe file has executed.

C# example code,

        Process p= new Process();
        p.StartInfo.WorkingDirectory = @"C:\whatever";
        p.StartInfo.FileName = @"C:\htmltools.exe";
        p.StartInfo.Arguments = @"http://www.verypdf.com C:\out.pdf";
        p.StartInfo.CreateNoWindow = true;
        p.Start();
        p.WaitForExit();

VC++ example code,

    CString ExecuteExternalFile(CString csExeName, CString csArguments)
    {
        CString csExecute;
        csExecute=csExeName + " " + csArguments;

        SECURITY_ATTRIBUTES secattr;
        ZeroMemory(&secattr,sizeof(secattr));
        secattr.nLength = sizeof(secattr);
        secattr.bInheritHandle = TRUE;

        HANDLE rPipe, wPipe;

        //Create pipes to write and read data
        CreatePipe(&rPipe,&wPipe,&secattr,0);
        //
        STARTUPINFO sInfo;
        ZeroMemory(&sInfo,sizeof(sInfo));
        PROCESS_INFORMATION pInfo;
        ZeroMemory(&pInfo,sizeof(pInfo));
        sInfo.cb=sizeof(sInfo);
        sInfo.dwFlags=STARTF_USESTDHANDLES;
        sInfo.hStdInput=NULL;
        sInfo.hStdOutput=wPipe;
        sInfo.hStdError=wPipe;
        char command[1024];
        strcpy(command, csExecute.GetBuffer(csExecute.GetLength()));

        //Create the process here.
        CreateProcess(0 command,0,0,TRUE,NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW,0,0,&sInfo,&pInfo);
        CloseHandle(wPipe);

        //now read the output pipe here.
        char buf[100];
        DWORD reDword;
        CString m_csOutput,csTemp;
        BOOL res;
        do
        {
                res=::ReadFile(rPipe,buf,100,&reDword,0);
                csTemp=buf;
                m_csOutput+=csTemp.Left(reDword);
        }while(res);
        return m_csOutput;
    }

    ExecuteExternalFile("C:\htmltools.exe", "http://www.verypdf.com C:\out.pdf");

Delphi example code,

    function RunExe2(Cmdline: string): boolean;
    var
        Startupinfo : TStartupinfo;
        Processinfo : TProcessinformation;
    begin
        Fillchar(Startupinfo,Sizeof(TStartupinfo),0);
        with startupinfo do
        begin
            cb := sizeof(tstartUPinfo);
            dwflags := STARTF_USESHOWWINDOW or STARTF_FORCEONFEEDBACK or STARTF_USESTDHANDLES;
            WSHOWWINDOW := SW_SHOWNORMAL;
        end;
            result := CreateProcess(Pchar(cmdline), nil, nil, nil, FALSE, NORMAL_PRIORITY_CLASS,
                        nil, nil, Startupinfo, Processinfo);
        Messagebox(0,pchar(SysErrorMessage(GetLastError)),'Error',MB_ICONERROR);
    end;

    RunExe2("C:\htmltools.exe http://www.verypdf.com C:\out.pdf");

ASP example code,

    Please download and install ExeShell COM from following web page first,

    http://www.verydoc.com/exeshell.html
   http://www.verydoc.com/download/exeshell.zip

    <%
        Set comEXEShell = Server.CreateObject("exeshell.shell")
        comEXEShell.RunCommandLine "Administrator", "123456", "C:\htmltools.exe http://www.verypdf.com C:\out.pdf"
        Set comEXEShell = Nothing
    %>

See Also:

Metafile/RTF/Image To PDF Command Line
Convert Windows Metafile (EMF, WMF), RTF and Image formats to Vector and Raster PDF files directly, it doesn't depend on Printer Drivers.


Document Converter Professional (docPrint Pro)
docPrint Document Converter Professional is a software product that dynamically converts MS Office 97/2000/XP/2003, WordPerfect, HTML, AutoCAD DWG, PostScript, EPS, PDF, MS Visio and many other document types to PDF, PostScript, EPS, JPEG, TIFF, PNG, PCX and BMP etc formats. It works in both GUI version and Command Line version. With docPrint Document Converter Professional you can convert your documents from and to PDF, EPS, PS, JPEG, TIFF, BMP, PCX, PNG files easily. (See user manual)

If you encounter any problems, please feel free to contact us at support@verypdf.com.

Contact:
    support@verypdf.com
    http://www.verypdf.com/


VeryPDF.com | VeryDOC.com | VeryPCL.com | Links | Contact

Copyright 2000-2008 by VeryPDF.com, Inc.
Send comments about this site to the webmaster.