Software Search, Categories and Specials
Ozgrid, Experts in Microsoft Excel Spreadsheets
Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com

Active DataXL - Download

 

AnalyserXL - Download

 

DownloaderXL - Download

 

Smart VBA - Download

 

TraderXL - Download

Document Converter To PDF COM Component

 

Microsoft Excel - From Beginner to Expert in 6 Hours/ EXCEL DASHBOARD REPORTS

Document Converter COM Component

Document Converter COM Component can batch convert html, htm, Document, word, rtf, txt, xls ,excel, ppt etc. files to PDF files on the fly, it can be used for web service, the Document Converter COM Component is useful for C++, VB, Delphi, ASP, etc. developers, it can convert all MS office Documentuments to PDF files pretty and quickly.

Document Converter COM Component Features

  1. Convert HTML (supports asp, cgi, css, Java Applets, flash, cookie) to PDF
  2. Dynamic page breaks with headers and footers
  3. Specify HTML from URL, or local file
  4. Supports Headers and Footers in IE setting
  5. Full control
  6. Convert Office 2000 (Word, Excel, Powerpoint) to PDF
  7. Convert Office 97 (Word, Excel, Powerpoint) to PDF

This Document Converter COM includes:

  1. HTML to PDF VB example
  2. Word to PDF VB example
  3. Excel to PDF VB example
  4. Powerpoint to PDF VB example
  5. Convert .Document/.html/.rtf/.txt/.xls etc to PDF file from a Command Line Tool, this Tool no any print dialog
  6. Batch HTML,Word,Excel,Powerpoint,etc. files to PDF conversion 

The Functions in the Document Converter COM Component

1.Properties

html2PDF([in] BSTR pVal);

    Set input Documentument filename or a URL point to a website,
For Example,
    Document2PDFCOM.html2PDF = "http://www.yahoo.com/";
    Document2PDFCOM.html2PDF = "C:\test.Document";

htmlBuffer([in] BSTR pVal);

    You also can set input content from a buffer, this function only can work for a html stream,
please notice, you can't use "html2PDF" and "htmlBuffer" in one time,
For Example,
    Document2PDFCOM.htmlBuffer = "<HTML><BODY>Hello</BODY></HTML>";

fileName([in] BSTR pVal);

    Set output pdf filename,
For Example,
    Document2PDFCOM.fileName = "C:/html2pdf.pdf"

headersFooters([in] BSTR pVal);   

    Set "on" or "off" the page's header and footer when convert a html file to pdf file,
For Example,
    Document2PDFCOM.headersFooters = "on";
    Document2PDFCOM.headersFooters = "off";

htmlHeaders([in] BSTR pVal);

    Set page header in the pdf file, it only available when "headersFooters" equal "on",
For Example,
    Document2PDFCOM.htmlHeaders = "Custom html header at here 1111111111";

htmlFooters([in] BSTR pVal);

    Set page footer in the pdf file, it only available when "headersFooters" equal "on",
For Example,
    Document2PDFCOM.htmlFooters = "Custom html footer at here 2222222222";

paperType([in] long pVal);

    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,
    Document2PDFCOM.paperType = 7;

pageWidth([in] single pVal);

    Set page width, in pixel, it only available when the "paperType" equal 9,
For Example,
    Document2PDFCOM.paperType = 9;
    Document2PDFCOM.pageWidth = 300;
    Document2PDFCOM.pageHeight= 300;

pageHeight([in] single pVal);

    Set page height, in pixel, it only available when the "paperType" equal 9,
For Example,
    Document2PDFCOM.paperType = 9;
    Document2PDFCOM.pageWidth = 300;
    Document2PDFCOM.pageHeight= 300;

subject([in] BSTR pVal);

    If you wish mail the generated pdf file as an email's attachment, you may set the subject of this email,
For Example,
    Document2PDFCOM.subject = "I can control the subject this way";
    Document2PDFCOM.SendEmail();

body([in] BSTR pVal);

    If you wish mail the generated pdf file as an email's attachment, you may set the body of this email,
For Example,
    Document2PDFCOM.body = "And I can control the body too"
    Document2PDFCOM.SendEmail();

printerStatus([in] BSTR pVal);

    Control the "PDF Camp Printer" enable or disable status,
    "on" : Enable the "PDF Camp Printer", so the "PDF Camp Printer" is available for any printable applications,
    "off": Disable the "PDF Camp Printer", you only can create pdf file from this COM Component, the "PDF Camp Printer" is unavailable for any other applications,
For Example,
    Document2PDFCOM.printerStatus = "on";
    Document2PDFCOM.printerStatus = "off";

showStatusBar([in] BSTR pVal);

    Show or hide the printing process,
For Example,
    Document2PDFCOM.showStatusBar = "on";
    Document2PDFCOM.showStatusBar = "off";

getVersion([in] double pVal);

    Get the version number of this COM Component,
For Example,
    var version = Document2PDFCOM.getVersion;

StillRunning([out, retval] long* pVal);

    This value retrieves the conversion status of the COM Component, if return value is 1, indicate the conversion is still running, 0 indicate the conversion is stoped,
For Example (VB codes),
    While PdfCreator.StillRunning = 1
        DoEvents
        Call WaitMessage
    Wend

2.Functions

    CreatePDF()

        Create PDF file,
    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.CreatePDF
        While PdfCreator.StillRunning = 1
            DoEvents
            Call WaitMessage
        Wend
        Set PdfCreator = Nothing
        Debug.Print "C:\sample.html -->C:\sample.pdf"

    ViewPDF()

        After create a PDF file and open it in Acrobat Reader software,
    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.ViewPDF
        While PdfCreator.StillRunning = 1
            DoEvents
            Call WaitMessage
        Wend
        Set PdfCreator = Nothing
        Debug.Print "C:\sample.html -->C:\sample.pdf"

    SendEmail()

        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

3.Additional functions

    Word2PDF(BSTR m_pDocumentFile, BSTR m_pPDFFile);

    Another function which also can convert .Document, .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,
For example:
Private Sub Word2PDF_ShellPrint_Click()
    Set PdfCreator = New PDFOUTLib.PdfCreator
    PdfCreator.Word2PDF "C:\sample.Document", "C:\sample.Document.pdf"
    Debug.Print "C:\sample.Document -->C:\sample.Document.pdf"
    MsgBox "Word2PDF_ShellPrint finished"
    Set PdfCreator = Nothing
End Sub

Screen Shots

Doc Converter COM Component $299.00  Secure Payment Options 30 Day Money Back Guarantee

Order Type:

Special! Free Choice of Complete Excel Training Course OR Excel Add-ins Collection on all purchases totaling over $70.00. ALL purchases totaling over $150.00 gets you BOTH! Purchases MUST be made via this site. Send payment proof to [email protected] 31 days after purchase date.

See Also: File Conversion Index for many more!


Instant Download and Money Back Guarantee on Most Software

Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!

Microsoft and Microsoft Excel are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft

GIVE YOURSELF OR YOUR COMPANY 24/7 MICROSOFT EXCEL SUPPORT & QUESTIONS