Frequently Asked Questions
General / Technical / Enterprise Deployment
/ Integration & Customization
How can I dynamically convert HTML to PDF?
rapidly and accurately convert HTML to PDF. OmniFormat includes
HTML2PDF995, a utility for rapid, quality conversion of HTML to
PDF and other formats. HTML2PDF995 may be called from other applications
or run from the command line to quietly convert HTML to PDF. See
the OmniFormat Read Me.
How can I bypass the Save
PDFEdit995 includes 2 auto-name settings:
1. Fixed filename
2. Name the PDF based on the original document name.
3. Adding "Output File=1" to the [Parameters] section of PDF995 will incrementally number PDF's starting with 1.
All PDFEdit995 settings are stored in the .\PDF995\res\PDF995.ini file.
How can I modify the functionality
of Pdf995 programmatically?
PdfEdit modifies c:\pdf995\res\pdf995.ini to control the functionality
of Pdf995. Programmers may invoke many of the features of PdfEdit
by direct modification of pdf995.ini.
How can I programmatically control Pdf995 and OmniFormat to create PDF's?
You may bypass the save as dialog of PDF995 in order to programmatically generate PDFs. See how PDFEdit's autoname options configure PDF995 by adjusting the .\PDF995\res\PDF995.ini file. You can modify the ini file without PDFEdit995 installed. The middle option (name the PDF based on the name of the document being printed) allows you to specify the name of the PDF from your application. It is possible to temporarily name the document before sending it to the printer. The third option allows you to specify the name and path of the filename you wish to create. See our Developer's FAQ for more information about this and an autonumber option. There is also information about printing Access Reports using VBA and programmatic signing of PDFs.
In addition to programmatic control of PDF995 output via the pd995.ini file, PDF995 supports control by passing the desired output file in the lpszDocName member of the DOCINFO windows structure. The DOCINFO structure is an argument of the StartDoc Windows API function. The lpszDocName must include: "< pdf995:filename>" where "filename" is the requested PDF output. A sample MFC application illustrating programmatic printing to PDF995 can be found at www.freeware995.com/misc/Snippet995.zip. A method for ensuring the PDF is complete may be found at www.freeware995.com/misc/pdf995printing.zip
The code at www.freeware995.com/misc/vbacode.txt and www.freeware995.com/misc/vbacode1.txt can be used to convert Access Reports to PDF. The latter code sample can be used to give the PDF a name other than the report name. Please make sure the path to PDF995.ini and PDFsync.ini are correct when you work with the code.
You may also modify psconvert.exe. Its source is available from the bottom of our FAQ.
Note that Omniformat offers a command line interface to converting Office documents, text files and HTML to PDF. Omniformat and HTML2PDF995 (included with Omniformat) may be run from IIS and other web servers. Instructions for this are included in the readme file in the HTML2PDF995 section. The instructions apply to calling Omniformat as well. Omniformat also includes command line utilities for changing default page size and orientation.
Aside from the Developers FAQ, we do not currently documentation for the PDF995.ini parameters. However, they are generally configurable via PDFedit995. Therefore we recommend configuring PDF995 using PDFedit995 and then noting how the PDF995.ini file was adjusted.
You can determine when a print job is complete by creating checking the filestatus of the PDF. When the file is not 0 bytes and not locked, it is complete. Alternatively, create a temporary "flag" file and specifying a processPDF handler (you could specify a batch file for example) that deletes the file. Thus, when the flag files has been deleted, the PDF has been created. See the developers faq about the processPDF handler and workflow.
How can I modify the Postscript
file before it is converted to PDF?
Add "ProcessPS=c:\myfolder\mypsapp.exe" to the [Parameters] section of PDF995.ini. PDF995 will run this specified executable after c:\programdata\PDF995\temp.ps has been created. It will wait to convert it to PDF until the specified executable has closed.
How can I integrate Pdf995
with Workflow and Document Management systems?
Add "ProcessPDF= c:\myfolder\mypdfapp.exe" to the [Parameters] section of pdf995.ini. Pdf995 will run this specified executable or batch command after the PDF file has been created. It will wait until the specified executable has been closed before continuing. The application may determine the name of the PDF generated by referring to the "Launch" parameter of pdf995.ini.
In order to run a batch file so that is not visible, add
to the [Parameters] section of pdf995.ini.
This feature enables custom processing and routing of PDF documents once they have been created.
How can I print to Pdf995
from my Visual Basic application?
The following sample opens c:\sample.doc and prints it:
Private Sub Command1_Click()
Dim wd As New Word.Application
Set wd = New Word.Application
wd.Documents.Open FileName:="""c:\sample.doc""", _
ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False,
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:=
wd.Documents.Application.ActivePrinter = "PDF995"
wd.Application.PrintOut FileName:="", Range:=wdPrintAllDocument,
wdPrintDocumentContent, Copies:=1, Pages:="",
Collate:=False, Background:=True, PrintToFile:=False, PrintZoomColumn:=0,
_ PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
What is the easiest way to convert Microsoft
Office and HTML files to PDF?
OmniFormat will convert over 75 file formats including DOC, XLS,
PPT, HTML and XML to PDF. It may be run from the command line. It
is free and may be downloaded from www.omniformat.com
Automated bookmark insertion:
It is possible to automatically add bookmarks specified using pdfEdit
v5.2 or later to all PDF's created with Pdf995 by adding the following
to the [Parameters] section of pdf995.ini:
The auto-insertion process will refer to .\documents and settings\all users\application data\pdf995\bookmarks.xml
for the bookmark list (if user mode is selected then it will be .\documents and
settings\username\application data\pdf995\bookmarks.xml). A sample bookmarks.xml file may be created by using pdfEdit995 to impose
bookmarks on a PDF. This file may be manually or progammatically
edited. This will also affect OmniFormat output.
Automated PDF Security:
Use Signature995 to configure Pdf995 to auto-encrypt pdfs at creation time.
How can I send a print job to both Pdf995 and a local or network printer at the same time?
is a free utility intended to automatically print the output of Pdf995 to any system or network printer when the PDF is complete. AutoPrint requires that PdfEdit995 is installed.
Place autoprint.exe in the .\pdf995\res folder. Execute autoprint.exe once to register it with Pdf995 as a processpdf handler (or add a processpdf entry in the pdf995.ini file manually). By default, the software will print 1 copy to the default printer. The following parameters may be specified in the [Auto Print] section of the ..pdf995\res\pdf995.ini file to specify a different printer or multiple copies:
Each time a pdf is created with Pdf995, AutoPrint will be invoked and print the PDF to the specified printer. AutoPrint can be uninstalled by removing the ProcessPDF entry in the [Parameters] section of ..pdf995\res\pdf995.ini.
Autoprint may be scripted to print a specified PDF. Run autoprint.exe and include the full path to the PDF in quotes. It may be invoked in a pre-processor or post-processor in Omniformat in order to batch print PDF files. See the Omniformat readme.
How can I convert an Access
Report to a PDF file?
The code at www.freeware995.com/misc/vbacode.txt
was used on Access 2002, but should work with any version. Also,
it has been tested on XP and 2000.