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. You may run "install.bat" file to install the
DocConverter COM
to 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" projects to try.
2. 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.
doc2pdf_asp:
An example will let you know how
to use DocConverter COM from ASP programs.
3. How to use
DocConverter COM?
>3.1. How convert a doc to pdf from
my html page?
A: You may use notepad.exe software to open the doc2pdf_html\test.htm file, find this function,
function Word2PDF()
{
//please modify the input and output file name
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 get a PDF
file named "C:/output.pdf", this PDF file is generated by "C:/input.doc" file.
>3.2. How convert a html file to PDF file from my html
page?
A: Please refer to the doc2pdf_html\test.htm file,
you may 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 filenames, 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, etc)?
A: You
may simple call the "html2pdf.exe" software from these programs directly.
>3.3. How convert html, doc, rtf, xls, ppt etc files to PDF files from my ASP
program?
A: Please refer to the "doc2pdf_asp" folder, you may run the "doc2pdf_service.exe"
software, the "doc2pdf_service.exe" is a Custom Windows Service, it will monitor
the "C:\wwwroot\doc2pdf_queue.txt" file, if you write a filename or URL into this file,
the "doc2pdf_service.exe" will call the html2pdf.exe software to convert this
file to pdf file automatically.
The "test.asp" file will write a filename to the "C:\wwwroot\doc2pdf_queue.txt" file,
this will inform the "doc2pdf_service.exe" to convert this file or URL to the
pdf file,
For more usage, please read the "readme.txt" file in the "doc2pdf_asp" folder.
4. Important issues
4.1 For ASP example:
1. The "doc2pdf_config.ini" file is
locate in the system32 folder, for example, it is
"C:\windows\system32\doc2pdf_config.ini" file in Windows XP,
2. You must put the
"doc2pdf_queue.txt", "doc2pdf_finished.txt" and "doc2pdf.ini" files into the
same folder, for example,
dim
wwwRootFolder
wwwRootFolder
= "C:\wwroot\"
'The "Queue_filename"
must same as the "Queue_filename" value in the "doc2pdf_config.ini" file
'"doc2pdf_queue.txt", "doc2pdf_finished.txt" and "doc2pdf.ini" must be placed in
the same folder
Queue_filename = wwwRootFolder & "doc2pdf_queue.txt"
Finished_filename = wwwRootFolder & "doc2pdf_finished.txt"
Config_filename = wwwRootFolder & "doc2pdf.ini"
3. You must set the value of "Queue_filename"
to "C:\wwwroot\doc2pdf_queue.txt" in the doc2pdf_config.ini file, for example,
in the
"C:\windows\system32\doc2pdf_config.ini" file,
Queue_filename=C:\wwwroot\doc2pdf_queue.txt
4. Please refer to the "doc2pdf_asp\test.asp"
file for more details.
4.2 For HTML to PDF Conversion:
You need install the MS IE6.0 to
convert HTML files to PDF files, the MS IE5.0 is not enough.
If you encounter any problems, please contact us at support@verypdf.com.
Contact:
support@verypdf.com
http://www.verypdf.com/