Limited time promo

How to use the COM


This help topic applies only to novaPDF. If you don't have it yet, you must download it first.

Download now Buy licenses
Mar 22, 2022
novaPDF 11.x
We strive to keep our help as accurate as possible. If you notice any inconsistencies or outdated info please let us know.
To use novaPDF COM in your application you need to follow next steps:

1. Create an instance of INovaPdfOptions interface

Create the object when the application starts and use it while printing to novaPDF SDK printer

2. Call the Initialize method

Initialize method has one parameter, the name of the printer (for example "novaPDF SDK", or when on the network "\\server name\novaPDF SDK")

3. Set novaPDF SDK options by calling SetOptionString or SetOptionLong (...) methods.

You can also manage profiles with AddProfile, CopyProfile, DeleteProfile, GetFirstProfile, GetNextProfile, GetActiveProfile, SetActiveProfile methods. A good sample for how to use this methods is the MFC Converter sample. Also, all "Hello World" samples have a "nova" unit where there are samples on how to set all options.
This step is optional. If you use the default options or if you already configured the desired options, you can skip it.

4. Register your application to receive Windows messages

novaPDF printer sends messages (StartDoc, StartPage, EndPage, EndDoc, FileSent, Print Error) while printing a document. You can register to receive Windows messages 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:

  • use Win32 API functions: OpenPrinter, DocumentProperties, CreateDC, StartDoc, StartPage,... See the Hello World sample.
  • print a file using the ShellExecute function. For a sample see MFC Converter.
  • use MFC document/view architecture. For more information look at the MFC Scribble sample.

6. Release the INovaPdfOptions instance

The object should be released only when all print jobs are finished.