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

Download now Buy licenses
Apr 08, 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 GetLayoutOptionString2 method retrieves an option of string type for a layout object
HRESULT GetLayoutOptionString2(
    [in, string] BSTR p_pwsObjectId,
    [in, string] BSTR p_pwsLayoutId,
    [in] LONG p_nOption,
    [out] BSTR* p_pwsValue
);

Parameters:

p_pwsObjectId
    [in] object id (watermark text, watermark image, overlay, signature or content)

p_pwsLayoutId
    [in] layout id (obtained with [GetLayout2](getlayout2-help.html) )

p_nOption
    [in] option constant

p_pwsValue
    [out] pointer to a pointer to a null terminated Unicode string that will contain the value of the retrieved option. 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
NV_UNKNOWN_PROFILE - no profile loaded
NV_INVALID_OPTION - wrong option constant
NV_PROFILE_ERROR - cannot find option in profile
NV_WRONG_OPTION_TYPE - option is not of type long

Remarks:

You can find the complete list of option names in the Profile option strings chapter. In the Include folder of novaPDF SDK installation folder you can find the definitions for all options in the next files: novaOptions.h, novaOptions.pas, Globals.bas.
For layout options, see Working with Layout objects.