8
3.
(Optional) When using the DLL interface of CDIntf, copy CDIntf.dll or CDIntf64.dll to your application’s
folder. This will guarantee that your version of this DLL will not be overwritten by other developers
installing a different version.
4.
(Optional) Register the CDIntf ActiveX. When using the ActiveX interface, the ActiveX control should be
registered in the system by calling RegSvr32 from your application’s directory: REGSVR32 CDINTF.DLL
or REGSVR32 CDINTF64.DLL.
CDIntf can be used through the DLL interface without the need for registering or creating ActiveXs.
5.
Initialize the printer at start-up of your application by calling DriverInit followed by the printer name.
6. Export to the format of your choice by printing from your application. When the user chooses the
export function of your application to generate a PDF, HTML, RTF, JPEG, TIFF or Excel file, you need to
set up the output file name using SetDefaultFileName, the file generation options using
SetFileNameOptions( NoPrompt + UseFileName + … ) and print to the "My Company Printer" as you
would do when printing to any other printer.
The developer can be in one of three situations:
o The developer licensed a product that generates only one format, e.g. PDF only or RTF only. In this
case, the printer will generate the right format without any specific option to set.
o The developer licensed a product that generates multiple formats including PDF, e.g. PDF and RTF.
In this case, to export to either RTF, HTML, JPEG, TIFF or Excel, the corresponding option should be
set in the call to SetFileNameOptions. The PDF file will be generated in all cases and should be
deleted by the developer if not needed. There is no method to have the Converter generate an
RTF/HTML/JPEG/TIFF/Excel file only without generating a PDF.
o The developer licensed a product that generates multiple formats excluding PDF, e.g. RTF and
HTML. In this case, to export to either RTF, HTML, the corresponding option should be set in the
call to SetFileNameOptions. A temporary file will be generated in these cases and will be deleted
by the printer when the print job is finished.
7. Restore the printer to its previous setting. When printing is over, the developer needs to call
SetFileNameOptions (0) to prevent other applications or users from overwriting the file that has just
been generated from the application.
8.
Uninitialize the printer before exiting. Before exiting the application, the DriverEnd function should be
called. This function will remove the printer if installed using PDFDriverInit, otherwise it will simply
disconnect from the printer.
Important Note for developers
To avoid confusion with other applications and with the single-user versions of the Document
Converter products, developers are required to use a printer name specific to their application or
company. Using the default printer names of "Amyuni Document Converter" or "Amyuni PDF
Converter" is not allowed.The activation code that is provided to you by Amyuni should be kept
confidential and not be revealed to end-users, even in this case where the developer’s products are
sub-licensed to other developers.
Important Note for Version 4.5
For 32-bit applications running on a 64-bit OS, the application is responsible of registering the 32-bit
ActiveX control using the 32-bit version of REGSVR32 or through the call to the DllRegisterServer API.
This is because the 64-bit printer driver is not capable of registering 32-bit ActiveX controls and will only
register the 64-bit CDIntf64.dll.