DOC to Any Converter

How to convert HTML with JavaScript or Java Applet code to PDF?

      In this article, I will show you how to convert HTML to PDF. When converting normal HTML file to PDF, we can find lots of tools available in market but when converting HTML file which contains Javascript or Java Applet or iFrame or SVG or Flash codes, things will go different.  Based on this need, VeryDOC developed software named VeryDOC Doc Converter COM, which can solve this matter easily. And by this software toolkit, you can also convert files of Microsoft Word, PowerPoint, Excel, JPG, PNG, GIF, HTML and others to PDF by script together with other application like VB, VC, C# etc. Please check more related information of this software on homepage, in the following part, let us check how this software works.

Step 1. Free trial Doc Converter COM

  • All the VeryDOC software are free to be downloaded and then have free trial including the COM version software. When downloading finishes, there will be an zip file. Please extract it to some folder then you can check related elements.
  • When converting HTML to PDF, please make sure you have the following application installed:
    Windows Internet Explorer 5.0 or newer and PDFcamp V1.8 or newer, or PDFcamp Pro V1.8 or newer
  • Please install DocConverter COM product by the following steps:
  • 1.1. Please download and install PDFcamp Printer v2.3 or PDFcamp Printer Pro v2.3 from our website,
    http://www.verypdf.com/pdfcamp/pdfcamp_setup.exe
    1.2. Please download DocConverter COM from our website,
    http://www.verypdf.com/pdfcamp/doc2pdf_com_trial.zip
    1.3. 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,
    1.4. Then you can run HTML2PDF.exe from command line to try, HTML2PDF.exe is a Windows Command Line Tool, you can run it from command line window.
    1.5. You can run "doc2pdf_html" or "doc2pdf_vb" or "doc2pdf_exe" projects to test its capability from HTML file and VB project.

Step 2. Convert HTML with Javascript or Java Applet to PDF

  • When converting HTML file which contains Javascript or Java Applet or iFrame or SVG or Flash codes to PDF file, please refer to the following example.
    "html2pdf.exe" "C:/javascript_test.htm" "C:/output.pdf" "EnableSupportApplet=yes,DelayTimeForPrintApplet=10000"
    As the conversion from HTML with complicated structure to PDF may take a little long times, we specify the conversion time as 10000 millisecond. And when input the code templates, please enable function of supporting Applet, then conversion could be done very nice.
  • It is known to all that Java applet is a small application written in Java, and delivered to users in the form of bytecode. The user launches the Java applet from a web page. The Java applet then executes within a Java Virtual Machine (JVM) in a process separate from the web browser itself, yet it can appear in a frame of the web page, in a new application window, or in Sun's AppletViewer, a stand-alone tool for testing applets. We have added this technology to our software. So this function could be fulfilled without any problem.

By this simply code template, you can convert HTML with  Javascript or Java Applet or iFrame or SVG or Flash code to PDF easily. During the using, if you have any question, please contact us as soon as possible.

PDF to Vector Converter

How to convert PDF to XPS and specify conversion page range from C#?

    In this article, I will show you how to convert PDF to XPS and specify conversion page range from C# code template. The software I use is named as VeryDOC PDF to Vector Converter, which is a professional tool for converting PDF files to vector image no matter in batch or singly. As command line software, you can call it together with any programming languages such as Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.  If you need to use DLL Library for further developing, there is also COM version available for you. Please check more detail information of this software on homepage, in the following part, let us check how to use this software.

Step 1. Free trial PDF to Vector Converter Command Line

  • Here I will take the command line version for example. If you need to use the  COM developer version, please download from corresponding downloading link.
  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can check help document, executable file and other files.

Step 2. Convert PDF to XPS and specify conversion page range from C#.

  • When you use this software, please refer to the usage and examples.
  • Here is the usage for your reference:pdf2vec.exe [options] [Options] <PDF Files>
  • By this software, you can not only specify conversion page range, but also specify other limitations. Please check related functions from the following parameters.
  • -firstpage <int> : first page to print, from 1 to max page
    -lastpage <int>  : last page to print, from 1 to max page
    -scale <int>        : specify the factor by which the printed output is to be scaled, The apparent page size is scaled from the physical page size by a factor of scale/100. This option is available for PCL, HPGL, XPS, PS and EPS formats.

  • Now let us check how to call this software from C# for converting PDF to XPS.
  • Make use of the PROCESS class available in SYSTEM.DIOGNOSTICS namaspace, use the following piece of code to execute the pdf2vec.exe file,
    ~~~~~~~~~~~~~~~~~
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;

    namespace ConsoleApplication1
    {
        class Program
    {
    static void Main(string[] args)
    {
    Process proc = new Process();
    proc.StartInfo.FileName = @"C:\\pdf2vec.exe";
    string strArguments = "";
    strArguments += "—firstpage 1 –lastpage 2";
    strArguments += " D:\\temp\\sample.pdf D:\\temp\\out.xps";
    Console.WriteLine(strArguments);
    proc.StartInfo.Arguments = @strArguments;
    proc.Start();
    proc.WaitForExit();
    }
    }
    }
    ~~~~~~~~~~~~~~~~~

During the using, if you have any question, please contact us as soon as possible.

DOC to Any Converter

How to convert HTML to PDF using letter paper format in portrait mode?

In this article, I will show you how to convert online website HTML file to PDF using letter paper format in portrait mode. The software I use is named as VeryDOC Doc Converter COM, by which you can convert files of Microsoft Word, PowerPoint, Excel, JPG, PNG, GIF, HTML and others to PDF by script together with other application like VB, VC, C# etc. 

When you use this software, please make sure you have the following software installed:PDFcamp Pro V1.8 or newer, Windows Internet Explorer 5.0 or newer. When you need to convert Office file to PDF or image, please make sure you have Microsoft Office 97 or newer installed.  Please check more information of this software on homepage, in the following part, let us check how to use this software.

Step 1. Free download Doc Converter COM

  • This is software component, by this software you can call the conversion from HTML to PDF together with any programming or scripting languages, such as Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc using the COM object (or DLL Library, or Command Line).
  • For uploading easily, we have compressed it to zip file. When downloading finishes, please extract it to some folder then you can find help documents and related documents.

Step 2. Convert HTML file to PDF using letter paper format in portrait mode.

  • When using this software to convert HTML to PDF using letter paper format in portrait mode.
  • Use Letter paper in portrait mode,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "papertype=0"

    Please check more examples in the following part.

    Use Letter paper in landscape mode,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "paperType=9,pageWidth=792,pageHeight=612"
    Use A4 paper in portrait mode,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "papertype=7"
    Use A4 paper in landscape mode,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "paperType=9,pageWidth=842,pageHeight=595"
    Use A3 paper in portrait mode,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "papertype=6"
    Use A3 paper in landscape mode,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "paperType=9,pageWidth=1190,pageHeight=842"
    Use A1 paper,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "paperType=9,pageWidth=1684,pageHeight=2384"
    Use A2 paper,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "paperType=9,pageWidth=1191,pageHeight=1684"
    Use A3 paper,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "paperType=9,pageWidth=842,pageHeight=1191"
    Use A4 paper,
    html2pdf.exe "http://www.google.com" "C:\google.pdf" "paperType=9,pageWidth=595,pageHeight=842"
    You can select more paper types for "papertype" value,
    ~~~~~~~~~~~~~~~~~
            Set page type, the value is from 0 to 9,
            0         "Letter [8.5 x 11 in]",
            1         "Legal [8.5 x 14 in]",
            2         "Executive [7.25 x 10.5 in]",
            3         "Ledger [355.6 x 215.9 mm]",
            4         "Tabloid [11 x 17 in]",
            5         "Screen [10 x 7.5 in]",
            6         "A3 [297 x 420 mm]",
            7         "A4 [210 x 297 mm]",
            8         "A5 [148 x 210 mm]",
    ~~~~~~~~~~~~~~~~~

If you need to know more functions and examples of this software, please read help document. During the using, if you have any question, please contact us as soon as possible.

DOC to Any Converter

Convert txt or doc to PDF using PHP

Question:Have anyone come across a PHP code that convert text or doc into PDF? It has to follow the same format as the original txt or doc file meaning the line feed as well as new paragraph.... I mean if the conversion could keep original format that would be much more better. Is there any solution on VeryDOC?

Answer: According to your needs, maybe you can have a free trial of software VeryDOC DOC to Any Converter,by which you can convert text and doc file to PDF using PHP easily. And by this software, you can convert all version word document files to PDF. And when converting doc to PDF, you do not need to install MS Office, which means the conversion from doc to PDF by this software is totally independent. Please check more related information of this software on homepage. In the following part, let us check how to use this software.

Step 1. Free download DOC to Any Converter SDK/COM Version 

  • There are many versions of this software like single command line version, GUI version and SDK version. Here I will take the SDK version for example as there are many code templates in it, by which you can call this software from PHP more easily.
  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can find code templates, executable file and other related elements.

Step 2. Convert text or doc to PDF using PHP without MS Office installed.

  • When you use this software, please refer to parameter list and usage.
  • When converting text or doc to PDF, you may use the following parameters:
  • -useoffice <int>: Use MS Office to render DOC, DOCX, RTF, TXT, PPT, PPTX, PPTS, PPTSX, XLS, XLSX formats
    -useoffice 0: Don't use MS Office to convert DOC, DOCX, RTF, TXT, PPT, PPTX, XLS, XLSX formats
    -useoffice 1: Use MS Office to convert DOC, DOCX, RTF, TXT, PPT, PPTX, XLS, XLSX formats
    -useprinter        : Convert DOC files to other formats via virtual printer
    -width <int>       : Set page width to PDF file
    -height <int>      : Set page height to PDF file
    -openpwd <string>  : Set 'open password' to PDF file
    -ownerpwd <string> : Set 'owner password' to PDF file

  • When converting text or doc to PDF using PHP code, please refer to the following code templates:
    For text to PDF using PHP code:
  • <?php
        $exeshell =new COM("exeshell.shell") or die("Can't start exeshell");
        $exeshell->RunCommandLine("UserName", "Password", ' "C:\doc2any.exe" "C:\test.txt" "C:\out.pdf" ');
        $exeshell = null;
    ?>

    For doc to PDF using PHP code:

    <?php
        $exeshell =new COM("exeshell.shell") or die("Can't start exeshell");
        $exeshell->RunCommandLine("UserName", "Password", ' "C:\doc2any.exe" "C:\test.doc" "C:\out.pdf" ');
        $exeshell = null;
    ?>

Please check functions and parameters of this software on homepage. During the using, if you have any question, please contact us as soon as possible.

    DOC to Any Converter

    PDF convert utility takes a wide range of input

    Question:I want to create PDF with word, excel, text, html input. It does not have to be a true .Net PDF library as long as it works with .NET code. Is there anything can handle that available? Is there any solution on VeryDOC?

    Answer: According to your needs, maybe you can have a free trial of software VeryDOC DOC to Any Converter. This software really takes a wide range of input like DOC, DOCX, DOCM, RTF, TXT, PPT, PPTX, XLS, XLSX, OpenOffice ODT, HTML, MHTML files. And this software is not really .Net PDF library  but you can call it together with .NET code or other computer languages like Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. If you choose the COM object (or DLL Library, or Command Line), file conversions can be done consecutively or simultaneously. Meanwhile creating PDF by this software is a slice of functions of this software. By it you can also create image files by this software. Please check more related information of this software on homepage, in the following part, let us check how to use this software.

    Step 1. Free download DOC to Any Converter SDK/COM Version

    • There are many license types for you to choose like by the End User License, you can apply this software under one computer. By the Server License, you can call this software under the whole server. And by the Developer License, you can develop software based on our software and then can be run on any number of servers/computers.
    • When downloading finishes, there will be a zip file. Please extract it to some folder then you can check elements and call this software to create PDF from word, excel, text, html input.

    Step 2. create PDF with word, excel, text, html input from .Net.

    • When you use this software, please refer to the usage and code template in extracted folder.
    • Here are some command line templates for your reference:
    • doc2any.exe example.doc  out.pdf
      doc2any.exe example.docx out.pdf
      doc2any.exe example.rtf  out.pdf
      doc2any.exe example.txt  out.pdf
      doc2any.exe example.ppt  out.pdf
      doc2any.exe example.pptx out.pdf
      doc2any.exe example.xls  out.pdf
      doc2any.exe example.xlsx out.pdf
      During the conversion, you may use the following parameters:
      -useoffice <int>         : Use MS Office to render DOC,DOCX,RTF,TXT,PPT,PPTX,PPTS,PPTSX,XLS,XLSX formats
      -useoffice 0: Don't use MS Office to convert DOC,DOCX,RTF,TXT,PPT,PPTX,XLS,XLSX formats
      -useoffice 1: Use MS Office to convert DOC,DOCX,RTF,TXT,PPT,PPTX,XLS,XLSX formats
      -useprinter              : Convert DOC files to other formats via virtual printer
      -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)

    There are two many parameters and command line templates, I can not list them here, Please check more on readme.txt file. When call this software to create PDF from .Net, please refer to the following code template:
    System.Diagnostics.Process.Start("C:\doc2any.exe C:\test.doc C:\out.pdf")

    During the using, if you have any question, please contact us as soon as possible.