GetDocumentTitle

The GetDocumentTitle method returns the title of the document that is currently being printed. This function should be called in the message handling loop and will return invalid results as soon as the document finishes printing.

Syntax

ActiveX:

BSTR GetDocumentTitle(long JobID)

DLL:

void GetDocumentTitle( HANDLE hPrinter, long JobID, LPSTR buf, long MaxBuf )

Parameters

hPrinter

[in] Handle to printer returned by any of the DriverInit function calls.

JobID

[in] Job ID as retrieved by the PDF message handling function.

Buf

[out] Address of buffer that will contain the document title.

MaxBuf

[in] This is the Size of the Buf buffer. The document title will be truncated if it is larger than the input buffer.

Return Value

This method returns the title of the document that is currently being printed.

Remarks

This function should be called from a PDF message handling function before the EndDocPost message is sent.