1. How to install the
DocConverter COM into my system?
1.1 Install the DocConverter COM
automatically
1. Please download and install PDFcamp v2.1 or PDFcamp Pro v2.1 from our
website,
http://www.toppdf.com/pdfcamp/pdfcamp_setup.exe
2. Please run "install.bat" file to install the
DocConverter COM
into your system automatically.
1.2 Install the DocConverter COM manually
1. Please download and install PDFcamp v2.1 or PDFcamp Pro v2.1 from our
website,
http://www.toppdf.com/pdfcamp/pdfcamp_setup.exe
2. Register the pdfout.dll file in your system, for example,
regsvr32 pdfout.dll
3. Run "doc2pdf_html" or "doc2pdf_vb", or "HTML2PDF.exe"
examples to try.
2. Files/directories
description
install.bat:
Install the DocConverter COM to
your system.
uninstall.bat:
Uninstall the DocConverter COM from
your system.
pdfout.dll:
This is DocConverter COM Component, you must register it into your system first.
doc2pdf_readme.html:
This file.
doc2pdf_html:
A html file will let you know how to call DocConverter COM from your html page.
doc2pdf_vb:
A VB project will let you know how to call DocConverter COM from your VB program.
html2pdf.exe:
A VB utility tool, you may convert any printable document to PDF file with this tool,
this tool also support the dynamic html pages and URL, this tool is a command line program,
you may by following ways to run it,
For example:
html2pdf.exe "http://www.yahoo.com" "c:\yahoo.pdf"
html2pdf.exe "http://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=pdf" "c:\google.pdf"
html2pdf.exe "C:\example.doc" "C:\example.pdf"
html2pdf.exe "C:\example.xls" "C:\example.pdf"
You also can call this program from any other programs or inclusion in scripts.
Please notice, you must use the quotation mark(") to include the input and
output file name.
doc2pdf_service.exe:
This example is a monitor service, you may use it as a web
service.
If you wish call DocConverter COM from ASP language, you must
run it first, this application is also can be started from "install.bat"
file.
doc2pdf_asp:
An example will let you know how
to use DocConverter COM from ASP programs, you must run "install.bat" file
before you run this example.
3. How to use
DocConverter COM?
3.1 How convert a DOC, RTF, PPT, XLS, TXT etc. files to PDF files
from
my html page?
A: You may use notepad.exe software to open the doc2pdf_html\test.htm file,
and find following function,
function Word2PDF()
{
//please modify the input and output file name at here
hh3.Word2PDF("C:/input.doc","C:/output.pdf");
}
After you finished the modification, please save it and close your notepad software,
then please run the test.htm file, click the "Word2PDF" button, then
you'll convert "C:/input.doc" document to "C:/output.pdf"
document.
3.2 How convert a html file to PDF file from my html
page?
A: Please refer to the doc2pdf_html\test.htm file,
please use following function to convert a html file or URL to a PDF file,
function CreatePDF()
{
hh3.headersFooters = "off";
hh3.html2PDF= "http://www.yahoo.com/";
hh3.fileName = "C:/html2pdf.pdf";
hh3.CreatePDF();
}
3.3 How convert html, doc, rtf, xls, ppt etc files to PDF files from my VB
program?
A: Please refer to the "doc2pdf_vb" directory, this project contain some
examples for doc, rtf, html, txt, etc. files to pdf files conversion.
You can use the "doc2pdf_vb" project to test this COM, you may open this project
in VB6, and modify some input and output file names, then compile and
run it to try.
3.4 How convert html, doc, rtf, xls, ppt etc files to PDF files from other
programs (C++, VC, Delphi, Power Build, Java, .NET, etc.)?
A: You can simple call the "html2pdf.exe" software from these programs directly.
3.5 How convert html, doc, rtf, xls, ppt, txt etc files to PDF files from my ASP
program?
A: Please by following
steps to try,
1. Please run "install.bat"
to install the DocConverter COM first, and make sure the "doc2pdf_service.exe"
application is running,
2. Please make sure that you have already
installed "PDFcamp Printer" before,
3. Please run following ASP
codes to try,
<%
set PdfCreator = server.createobject("PdfOut.PdfCreator")
PdfCreator.html2PDF= "http://www.google.com/"
PdfCreator.fileName = "C:/google.pdf"
result = PdfCreator.Doc2PDFViaSocket()
set PdfCreator = nothing
%>
4. Then you can convert .html, URL, .doc, .rtf, .ppt, .xls,
txt etc. files to PDF files
from your ASP codes.
For more
information, please read the "readme.txt" file in the "doc2pdf_asp" folder.
4. Important issues
4.1 For ASP example:
1 You need run "Install.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.
4.2 For HTML to PDF Conversion:
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.
4.3 For MS Office documents to PDF Conversion:
You need install MS Word, Excel,
PowerPoint, etc. applications to convert corresponding documents to PDF files.
5. Four methods to convert MS Office documents (DOC,
RTF, PPT, XLS, TXT, etc.) to PDF files
5.1 Use MS Internet Explorer Control method
~~~~~~~~~~~~~~~~~~~
Set PdfCreator = New PDFOUTLib.PdfCreator
PdfCreator.HTML2PDF = "C:\sample.doc"
PdfCreator.FileName = "C:\sample.doc.pdf"
PdfCreator.HeadersFooters = "off"
PdfCreator.paperType = 7 '//7 is A4 paper, 6 is A3 paper
PdfCreator.CreatePDF
While PdfCreator.StillRunning = 1
DoEvents
Call WaitMessage
Wend
Set PdfCreator = Nothing
~~~~~~~~~~~~~~~~~~~
5.2 Use Shell Print method (Print from Windows Explorer)
~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~
5.3 Use MS Office OLE method
Please refer to "doc2pdf_exe"
folder for detailed usages, this folder contains VB source code for HTML2PDF.exe
software, it is only available in the full version of DocConverter COM package.
5.4 Use "HTML2PDF.exe" Command Line application
You can call "html2pdf.exe"
Command Line software from your application directly, this is easiest method.
If you encounter any problems, please contact us at support@verypdf.com.
Contact:
support@verypdf.com
http://www.verypdf.com/