|
How to use the COM |
Top Previous Next |
|
To use novaPDF COM in your application you need to follow next steps:
1. Create an instance of INovaPdfOptions interface 2. Call the Initialize method with the following parameters
3. Set novaPDF Printer options by calling SetOptionString or SetOptionLong methods. You can also manage profiles with AddProfile, CopyProfile, RenameProfile, DeleteProfile, GetFirstProfile, GetNextProfile, GetActiveProfile, SetActiveProfile methods. A good sample for how to use this methods is the MFC Converter sample. This step is optional. If you use the default options or if you already configured the desired options, you can skip it.
4. Register for novaPDF Printer Windows messages (StartDoc, StartPage, EndPage, EndDoc, FileSent, Print Error) using the RegisterEventWindow method. You also need to implement message handlers for the registered messages. See MFC Scribble or MFC Converter samples. This step is also optional. If you do not need to implement this event handlers you can skip it.
5. Start a print job. You can do it as follows:
6. Release the INovaPdfOptions instance. |