Limited time promo

GetPDFFileName

English

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

Download now Buy licenses
Apr 14, 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.
The GetPDFFileName method retrieves the name of the last generated PDF file.
HRESULT GetPDFFileName(
    [in] BOOL p_bPrintStarted,
    [out, string] LPWSTR* p_pwsFileName
);

Parameters:

p_bPrintStarted
    [in] flag, what file name to retrieve. See Remarks.

p_pwsFileName
    [out] pointer to a pointer to a null terminated Unicode string that will contain the file name.
On success this value must be freed by the caller with CoTaskMemFree.

Return values:

S_OK on success or COM error code
NV_NOT_INITIALIZED - Initialize was not called

Remarks:

Because the novaPDF SDK works with the printer spooler queue, the documents sent to the printer are added to the queue. If there are already some other documents in the queue, the current document is not processed until the previous ones are finished.
There are two PDF file names you can find out, depending on the value of the p_bPrintStarted flag:
  • the name of the PDF file that was just sent to the printer
  • the name of the PDF file that is currently processed by the printer
This information is available only on the computer that starts the print job, if the PDF file is saved local and not on the network.