doc to any converter

How to convert Office file to PDF from web service applications?

In this article, I will show you how to convert Office file to PDF from web service applications. The software I use is named as VeryDOC Doc Converter COM, by this COM software, we can convert .doc, .xls, .html, .txt, .rtf etc files and any other printable files to PDF files. During the conversion, you can set page height, page width and other limitations to output PDF file. Please check more information of this software on homepage, in the following part, let us check how to use this software call DocConverter COM from PHP, ASP, C#, VB.NET, ASP.NET applications.

Step 1. Free download Doc Converter COM

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can check elements in it. There are some elements in the extracted folder: pdfout.dll, install_as_service.bat, install_as_exe.bat, uninstall.bat, and doc2pdf_service.exe.
  • doc2pdf_service.exe is an Windows Service Application,you can call this software from Web Service Applications easily, for example, once you call DocConverter COM from PHP, ASP, C#, VB.NET, ASP.NET applications, doc2pdf_service.exe will accept and execute all conversion tasks automatically. This application will be started by "install_as_exe.bat" and "install_as_service.bat" files.
    There is one example of calling doc2pdf_service.exe software:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    There are two methods to launch this software--"doc2pdf_service.exe" : run as a Windows System Service and run as a Normal Windows Application,
    1. Run As a Normal Windows Application: C:\>doc2pdf_service.exe "-exe"
    This Command Line will run doc2pdf_service.exe as a normal windows application.
    2. Run As a Windows Service: C:\>doc2pdf_service.exe -i
    This Command Line will install the "VeryPDF DocConverter COM Service" into your system.
    C:\>doc2pdf_service.exe -u
    This Command Line will uninstall the "VeryPDF DocConverter COM Service" from your system.
    C:\>net start "VeryPDF DocConverter COM Service"
    C:\>net stop "VeryPDF DocConverter COM Service"
    Above Command Lines will start/stop "VeryPDF DocConverter COM Service" from your system.

Step 2. Converting Office to PDF from web service application.

    • When you need to convert Office to PDF from web service application, please pay more attention to the following things:
      For ASP example:
      1 You need run "install_as_exe.bat" file first, and make sure "doc2pdf_service.exe" application is running,
      2. Please make sure "html2pdf.exe", "doc2pdf_service.exe", "doc2pdf_config.ini" and "pdfout.dll" files have been installed into your system32 folder,
      3. Please make sure you have already installed "PDFcamp Printer" product.
      Here is some code examples for your reference:

~~~~~~~~~~~~~~~~~~~
Set PdfCreator = New PDFOUTLib.PdfCreator
PdfCreator.Word2PDF "C:\sample.doc", "C:\sample.doc.pdf"
PdfCreator.Word2PDF "C:\sample.xls",  "C:\sample.xls.pdf"
PdfCreator.Word2PDF "C:\sample.ppt", "C:\sample.ppt.pdf"
MsgBox "Word2PDF_ShellPrint finished"
Set PdfCreator = Nothing
~~~~~~~~~~~~~~~~~~~

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

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
doc to any converter

How to insert text file to existing PDF by COM software?

In this article, I will show you how to insert text to PDF by COM software. Meanwhile this method can also be used to append text file to an existing PDF. COM software allows you to run the conversion together with VB, VC, C# etc. The software I will use is VeryDOC Doc Converter COM, by which you can also integrate the corresponding SOFTWARE into your developed software and redistribute it with royalty-free. You have the right to modify and use the SOFTWARE source codes.  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

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can use this software.
  • In the extracted package, you will find the following elements:
  • pdfout.dll:This is the DocConverter COM Component, you must register it into your system prior to use the HTML2PDF.exe application, "install_as_exe.bat" and "install_as_service.bat" files will install and register pdfout.dll file into your system automatically.
    install_as_service.bat: It will copy all necessary files to system32 folder and install "doc2pdf_service.exe" as a System Service, the Service Name is "VeryPDF DocConverter COM Service", you can start, stop, restart this Service from Windows System Service Management Application.
    install_as_exe.bat: It will copy all necessary files to system32 folder and install "doc2pdf_service.exe" as a Normal Windows Application.
    uninstall.bat:It will uninstall DocConverter COM from your Windows System.

Step 2. Insert text to PDF by this COM software.

  • When you use this software, please refer to the usage and code templates.
  • Here are some functions code examples, please have a check.
  • When you need to insert "C:/test.txt" file at the first page of an existing PDF file, please refer to the following command line template.
    "html2pdf.exe" "C:/test.txt" "C:/output.pdf" "AutomaticValue=3,Overwrite=yes"
    "html2pdf.exe" "C:/test.doc" "C:/output.pdf" "AutomaticValue=3,Overwrite=yes"
    "html2pdf.exe" "C:/test.html" "C:/output.pdf" "AutomaticValue=3,Overwrite=yes"
  • When you need to append "one text file at the end of PDF file, please refer to the following command line templates:
    "html2pdf.exe" "C:/test.txt" "C:/output.pdf" "AutomaticValue=4,Overwrite=yes"
    "html2pdf.exe" "C:/test.doc" "C:/output.pdf" "AutomaticValue=4,Overwrite=yes"
    "html2pdf.exe" "C:/test.html" "C:/output.pdf" "AutomaticValue=4,Overwrite=yes"
  • By this software, you can specify output PDF file name template by the following command line templates:
  • Set output pdf filename,For Example,Doc2PDFCOM.fileName = "C:/html2pdf.pdf"

  • You can also specify output PDF file paper size like the following output paper formats:
  • 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]",
        9 Custom page size
    For Example,
        Doc2PDFCOM.paperType = 7;

So by those parameters, you can insert text to PDF easily. Please check more functions of this software on user manual. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
doc to any converter

How to create PDF from printable files and then send output PDF directly by C#?

Sometime, we need to convert printable files to PDF for printing, long time preserving or others by self-developed applications like ERP.  In this article, I will share a method of creating PDF from printable PDF file and then send output PDF directly by C#. The software I will 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. Please check more detail information on homepage, in the following part, I will show you how to use this software.

Step 1. Free download and install Doc Converter COM

  • Please download and install PDFcamp Printer v2.3 or PDFcamp Printer Pro v2.3, and then download 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 command line to try, HTML2PDF.exe is a Windows Command Line Tool, you can run it from command line window,For example:html2pdf.exe "http://www.yahoo.com" "C:\yahoo.pdf".

Step 2. Create PDF from printable file and then send output PDF by email directly.

  • When you need to call this COM software together with  other applications like C#, please refer to the following command line templates.
  • The following command line template can help you convert .doc, .xls, .html, .txt, .rtf etc files to PDF files, but it will popup a print dialog when conversion, this is a global function, you need set any value before you call it,
    Private Sub Word2PDF_ShellPrint_Click()
        Set PdfCreator = New PDFOUTLib.PdfCreator
        PdfCreator.Word2PDF "C:\sample.doc", "C:\sample.doc.pdf"
        Debug.Print "C:\sample.doc -->C:\sample.doc.pdf"
        MsgBox "Word2PDF_ShellPrint finished"
        Set PdfCreator = Nothing
    End Sub
  • When you need to send output PDF file to some body by email directly, please refer to the following command line templates. After create a PDF file and send it from your mail client, For Example,
            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
            PdfCreator.subject = "I can control the subject this way"
            PdfCreator.body = "And I can control the body too"
            PdfCreator.SendEmail
            While PdfCreator.StillRunning = 1
                DoEvents
                Call WaitMessage
            Wend
            Set PdfCreator = Nothing

There are too many functions of this software, I can not list all of them here. If you need to know more functions of this software, please visit homepage or User Manual of Doc Converter COM Component. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
html converter

How to convert encrypted website to PDF by Doc Converter COM?

   In this article, I will show you how to convert encrypted website to PDF by VeryDOC Doc Converter COM. The encrypted website refers to those websites which have user name and password requited when you need to enter those websites. When converting those website to PDF, you need to specify user name and password first then converting it to PDF. For catering this needs, Doc Converter COM has such function.

What VeryDOC Doc Converter COM is?

VeryDOC Doc Converter COM is a software component which can be used to be integrated with other applications (or DLL Library, or Command Line), enabling developers to access the converter via any programming or scripting languages, such as Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.

By this software, you can fulfill the following functions:

  • Create PDF from any printable files like web pages and DOC, RTF, TXT, PPT, XLS files into PDF paperwork.
  • After creating PDF, you can send output PDF to others by email directly.
  • Create PDF and specify paper size.
  • When converting HTML to PDF, you can set input document filename or a URL point to a website, set input content from a buffer, this function only can work for a html stream and others.
  • Please check more functions of this software on homepage. In the following part, let us check how to convert encrypted website to PDF briefly.

Convert encrypted website to PDF

  • Free download Doc Converter COM. When downloading finishes, there will be a zip file. Please extract it to some folder then you can find component and help document.
  • When converting encrypted website to PDF, please refer to the following command line template.
    Set username&password for encrypted site to PDF conversion,html2pdf "http://www.xxxxxx.com/index.html" "C:/output.pdf" postdata=Username=support@verypdf.com&Password=password

By the above command line, first you need to input the website URL then the full path of the output PDF file. input user name and password. By this way, you can convert encrypted website to PDF.

Here are more examples of other functions for your reference.

  • Set page header&footer for HTML to PDF conversion,
    "html2pdf.exe" "www.yahoo.com" "C:\yahoo.pdf" "htmlHeaders=this is header,htmlFooters=this is footer"
  • Set values for page header&footer within HTML to PDF conversion,
    "html2pdf.exe" "www.yahoo.com" "C:\yahoo.pdf" "htmlHeaders=&w&bPage &p/&P,htmlFooters=&u&b&d"
  • Set passwords for DOC, DOCX, HTML, MHTML, PPT, PPTX, XLS, XLSX, RTF, etc. document to PDF conversion,
    "html2pdf.exe" "C:/Doc1.DOC" "C:/Doc1.pdf" "Encryption=2,EncryBits=16,Permission=0,UserPass=,OwnerPass=123"
  • Set page margin within conversion,
    "html2pdf.exe" "http://www.yahoo.com" "C:/yahoo.pdf" "paperType=9, pageWidth=575, pageHeight=850, margin_left=10, margin_top=40, margin_right=10, margin_bottom=40"

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

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
html converter

How to convert HTML to PDF together with VC++ code?

       When you need to convert HTML file no matter online or local files to PDF from VC++ code, the following article will be quite helpful for you. Here I will introduce one software named VeryDOC Doc Converter COM, which is a COM object (or DLL Library, or Command Line), enabling developers to access the converter via any programming or scripting languages, such as Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. The main function of this software is that converting files like Microsoft Word, PowerPoint, Excel, JPG, PNG, GIF, and HTML to PDF and set some limitations. Please get more related information on homepage, in the following part, let us check how to use this software from one example.

Step 1. Free trial of Doc Converter COM

  • All the VeryDOC software is free downloading and trial including the COM version software. But when converting HTML to PDF by this software, please make sure you have the following application installed on your computer:
    PDFcamp V1.8 or newer, or PDFcamp Pro V1.8 or newer and Windows Internet Explorer 5.0 or newer.
  • When downloading finishes, there will be a zip file. You need to extract it to some folder then you can find code template and DLL Library.

Step 2. Convert HTML to PDF from  VC++ code.

  • When you open this software folder then you can find code templates of VB, VC and others. Please run this software according to the template and usage.
  • Here is one example for your reference.
    How do I call DocConverter COM from VC++ code?
    A: Please look at following VC++ function,
                    BOOL ConvertHTMLToPDF (const char *lpHTMLFile, const char* lpPDFFile)
                    {
                            IPdfCreator pdfout;
                            BOOL bRet = pdfout.CreateDispatch(_T("PdfOut.PdfCreator"));
                            if(bRet == FALSE)
                            {
                                    printf("Can't locate 'PdfOut.PdfCreator' in this computer, please reinstall this product to try again.\n");
                                    return FALSE;
                            }
                            pdfout.SetActivePrinter("PDFcamp Printer");
                            pdfout.SetFileName(lpPDFFile);
                            pdfout.SetHtml2PDF(lpHTMLFile);
                            pdfout.SetPaperType(0);
                            pdfout.CreatePDF();
                            while(pdfout.GetStillRunning() == 1)
                            {
                                    MSG msg;
                                    while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
                                    {
                                            TranslateMessage (&msg);
                                            DispatchMessage (&msg);
                                    }
                                    Sleep(20);
                            }
                            pdfout.DetachDispatch();
                            return TRUE;
                    }
    For more information, please read the "readme.txt" file in the "doc2pdf_asp" folder.

Please note when converting HTML to PDF, you need install the MS Internet Explorer 6.0 (MS IE6.0) to convert HTML files to PDF files, the MS IE5.0 and IE5.5 are not enough.  If you need to know more information, please check user manual. During the using, if you have any question, please contact us as soon as possible. 

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)