NewCustomPrinter

Rendering and printing

Description

Creates a custom printer and returns the name of the custom printer. The returned printer name can be used as the PrinterName parameter of the PrintDocument function. Before printing, the properties of the printer can be set using the SetupPrinter function.

Syntax

Delphi

Function TPDFlib.NewCustomPrinter(Const OriginalPrinterName: WideString): WideString;

ActiveX

Function PDFlib::NewCustomPrinter(OriginalPrinterName As String) As String

DLL

const wchar_t* DLNewCustomPrinter(int InstanceID, const wchar_t* OriginalPrinterName);
const char* DLNewCustomPrinterA(int InstanceID, const char* OriginalPrinterName);

Parameters

OriginalPrinterNameThe name of the printer to use for printing. This is the name that appears in the Windows Print Manager. Use the GetPrinterNames function to return a list of valid printers on the system.

Return values

Returns the name of the newly created custom printer, which can be passed as the PrinterName parameter of the printing functions. Returns an empty string when OriginalPrinterName does not identify an installed printer.