The AddNovaPrinterExt method adds a temporary novaPDF printer in the system
HRESULT AddNovaPrinterExt(
[in, string] LPCWSTR p_wsPrinterName,
[in, string] LPCWSTR p_wsPortName,
[in, string] LPCWSTR p_wsOEMID,
[in, string] LPCWSTR p_wsServicePort,
[in, string] LPCWSTR p_wsLicensekey,
[in] SHORT p_nDefaultPaperSize,
[in, string] LPCWSTR p_wsDefaultPaperName,
[in] SHORT p_nDefaultPaperLength,
[in] SHORT p_nDefaultPaperWidth,
[in] SHORT p_nDefaultResolution,
[in] SHORT p_nMaxCopies,
[in] SHORT p_nDefaultCopies,
[in] SHORT p_nDefaultCollate,
[in] SHORT p_nDefaultOrientation,
[in] SHORT p_nDefaultScale,
[in] BOOL p_bAllowChangePaper,
[in] BOOL p_bAllowChangeResolution,
[in] BOOL p_bAllowChangeCopies,
[in] BOOL p_bAllowChangeCollate,
[in] BOOL p_bAllowChangeOrientation,
[in] BOOL p_bAllowChangeScale,
[in] BOOL p_bSharedPrinter,
[in, string] LPCWSTR p_wsSharedName
);
Parameters:
p_wsPrinterName
[in] pointer to a null terminated Unicode string containing the name of the printer
p_wsPortName
[in] pointer to a null terminated Unicode string containing the name of the printer port
p_wsOEMID
[in] pointer to a null terminated Unicode string containing custom OEMID; for trial is "nPdfSdk10_Softland"
p_wsServicePort
[in] pointer to a null terminated Unicode string containing novaPDF Server service port number, by default 8501
p_wsLicenseKey
[in] pointer to a null terminated Unicode string containing license key
p_nDefaultPaperSize
[in] default paper size (for instance 1 for Letter, 9 for A4,.,..)
p_wsDefaultPaperName
[in] pointer to a null terminated Unicode string containing paper name (like Letter, A4,...)
p_nDefaultPaperLength
[in] default paper length expressed in tenths of millimeters (for A4, 2970)
p_nDefaultPaperWidth
[in] default paper width expressed in tenths of millimeters (for A4, 2100)
p_nDefaultResolution
[in] default resolution (300, 600,...)
p_nMaxCopies
[in] maximum number of copies allowed (999)
p_nDefaultCopies
[in] default number of copies (1)
p_nDefaultCollate
[in] default collate (1 or 0)
p_nDefaultOrientation
[in] default orientation (1 - portrait, 2 - landscape)
p_nDefaultScale
[in] default scale (100)
p_bAllowChangePaper
[in] bool, allow user to change paper size
p_bAllowChangeResolution
[in] bool, allow user to change resolution
p_bAllowChangeCopies
[in] bool, allow user to change copies
p_bAllowChangeCollate
[in] bool, allow user to change collate
p_bAllowChangeOrientation
[in] bool, allow user to change orientation
p_bAllowChangeScale
[in] bool, allow user to change scale
p_bSharedPrinter
[in] share the printer when added
p_wsSharedName
[in] pointer to a null terminated Unicode string containing shared printer name
Return values:
S_OK
on success or COM error codeNV_NOT_A_NOVAPDF_PRINTER
- invalid OEMIDNV_INVALID_LICENSE
- invalid licenseNV_INVALID_PRINTER_NAME
- a printer with the specified name or options cannot be addedRemarks:
This method must be called before printing documents and setting novaPDF options. It will add a printer in the system with the specified name and options. This printer will be available until DeleteNovaPrinter is called with the same printer name. Use this method if you wish to work with temporary printers and you wish to configure special printer defaults.