SetupCustomPrinter
Description
Changes the properties of a custom printer created with the NewCustomPrinter function.
Syntax
Delphi
function TDebenuPDFLibrary1811.SetupCustomPrinter(CustomPrinterName: WideString;
Setting, NewValue: Integer): Integer;
ActiveX
Function DebenuPDFLibrary1811.PDFLibrary::SetupCustomPrinter(
CustomPrinterName As String, Setting As Long, NewValue As Long) As Long
DLL
int DPLSetupCustomPrinter(int InstanceID, wchar_t * CustomPrinterName, int Setting,
int NewValue)
Parameters
CustomPrinterName | A custom printer name, as returned by the NewCustomPrinter function |
Setting |
1 = Paper size 2 = Paper length 3 = Paper width 4 = Copies 5 = Print quality 6 = Color 7 = Duplex 8 = Collate 9 = Default source (paper trays / bins) 10 = Media type 11 = Orientation |
NewValue |
For paper size: 0 Uses length and height to specify custom size in tenths or millimetres 1 to 68, DMPAPER_XXX (Win32 API DEVMODE data structure) For paper height and width: Size of paper in tenths of millimetres For copies: Number of copies For print quality: 1 = high, 2 = medium, 3 = low, 4 = draft or an exact DPI, for example 600 For color: 1 = monochrome, 2 = color For duplex: 1 = simplex, 2 = vertical duplex, 3 = horizontal duplex For collate: 0 = no, 1 = yes For default source: 1 to 15, DMBIN_XXX (Win32 API DEVMODE data structure) 256 and higher for custom bins / paper trays, see the GetPrinterBins function For media type: 1 = standard, 2 = transparency, 3 = glossy 256 and higher for device-specific media For orientation: 1 = portrait, 2 = landscape |
Return values
0 | The custom printer could not be found, or the Settings or NewValue parameters were invalid |
1 | The custom printer settings were changed successfully |