Printer Information
Printer Information Component for VCLFor all versions of Delphi and C++ Builder from 3 to 10.2 Tokyo and for all versions of Windows from XP to 10
Printer Information allows you to get all the information about default printer in your system through Delphi-style properties. The component uses internal caches for storing data, so component works as fast as possible even with network printers.
TPrinterInformation Interface
procedure Update;
Refreshs internal caches.
property ContentName: string;
Name of data content. Usually this property contains name of current printer.
property ContentDescription: string;
Description of data content. Usually this property contains name of current printer and name of driver.
property ContentComment: string;
Comment of data content.
property PrinterFlags: TPrinterFlags;
Flags of current printer object that describe how the application must show this printer object. This property is a set of the following values: peExpand, peContainer, peIconTopLevelNetworkName, peIconNetworkDomain, peIconPrintServer, peIconPrinter.
property ServerName: string;
The server that controls the printer. If this string is empty, the printer is controlled locally.
property PrinterName: string;
The name of the printer.
property ShareName: string;
The share point for the printer.
property PortName: string;
The port(s) used to transmit data to the printer. If a printer is connected to more than one port, the names of each port are separated by commas (for example, 'LPT1:,LPT2:,LPT3:').
property DriverName: string;
The name of the printer driver.
property Comment: string;
A brief description of the printer.
property Location: string;
The physical location of the printer (for example, 'Bldg. 38, Room 1164').
property SepFile: string;
The name of the file used to create the separator page. This page is used to separate print jobs sent to the printer.
property PrintProcessor: string;
The name of the print processor used by the printer.
property DataType: string;
The data type used to record the print job.
property Parameters: string;
The default print-processor parameters.
property SecurityDescriptor: Pointer;
A pointer to a SECURITY_DESCRIPTOR structure for the printer.
property Attributes: TPrinterAttributes;
The printer attributes. This property is a set of the following possible values:
paDirect,
paDoCompleteFirst,
paEnableDevQueryPrint,
paKeepPrintedJobs,
paLocal,
paNetwork,
paPublished,
paQueued,
paRawOnly,
paShared,
paFax,
paFriendlyName,
paMachine,
paPushedUser,
paPushedMachine,
paTerminalServer.
property Priority: DWORD;
A priority value that the spooler uses to route print jobs.
property DefaultPriority: DWORD;
The default priority value assigned to each print job.
property StartTime: DWORD;
The earliest time at which the printer will print a job. This value is expressed as minutes elapsed since 12:00 AM GMT (Greenwich Mean Time).
property UntilTime: DWORD;
The latest time at which the printer will print a job. This value is expressed as minutes elapsed since 12:00 AM GMT (Greenwich Mean Time).
property Status: TPrinterStatuses;
The printer status. This property is a set of the following possible values:
psBusy,
psDoorOpen,
psError,
psInitializing,
psIOActive,
psManualFeed,
psNoToner,
psNotAvailable,
psOffline,
psOutOfMemory,
psOutputBinFull,
psPagePunt,
psPaperJam,
psPaperOut,
psPaperProblem,
psPaused,
psPendingDeletion,
psPowerSave,
psPrinting,
psProcessing,
psServerUnknown,
psTonerLow,
psUserIntervention,
psWaiting,
psWarmingUp.
property JobCount: DWORD;
The number of print jobs that have been queued for the printer.
property AveragePPM: DWORD;
The average number of pages per minute that have been printed on the printer.
property DeviceName: string;
The friendly name of the printer or display; for example, 'PCL/HP LaserJet' in the case of PCL/HP LaserJet. This string is unique among device drivers.
property SpecVersion: Word;
The version number of the initialization data specification on which the data structure is based.
property SpecVersionString: string;
The SpecVersion property in 'XX.XX' string format.
property DriverVersion: Word;
The driver version number assigned by the driver developer.
property DriverVersionString: string;
The DriverVersion property in 'XX.XX' string format.
property DataFields: TDataFields;
Specifies whether certain properties have been initialized by the printer driver. The value is a set of the possible following values:
dfOrientation,
dfPaperSize,
dfPaperLength,
dfPaperWidth,
dfScale,
dfCopies,
dfDefaultSource,
dfPrintQuality,
dfXResolution,
dfYResolution,
dfColor,
dfDuplex,
dfTrueType,
dfCollate,
dfFormName,
dfICMMethod,
dfICMIntent,
dfMediaType,
dfDitherType.
property PaperOrientation: TPaperOrientation;
The orientation of the paper. Can be poUnknown, poPortrait or poLandscape.
property PaperSize: Word;
The size of the paper. Returned value is one of the DMPAPER_* WinAPI's constants.
property PaperSizeName: string;
The name of current paper size, i.e. 'Legal 8 1/2 x 14 in'.
property PaperLength: Word;
The paper length in mm, if some unstandard size is used.
property PaperWidth: Word;
The paper width in mm, if some unstandard size is used.
property Scale: Word;
The factor by which the printed output is to be scaled. The apparent page size is scaled from the physical page size by a factor of Scale/100.
property Copies: Word;
The number of copies printed if the device supports multiple-page copies.
property DefaultSource: TPaperSource;
The paper source. The value can be
psAuto,
psCassette,
psEnvelope,
psEnvelopeManual,
psFirst,
psLargeCapacity,
psLargeFormat,
psLast,
psLower,
psManual,
psMiddle,
psTractor,
psSmallFormat or
psUser.
property PrintQuality: TPrintQuality;
The printer resolution. The value can be
pqHigh,
pqMedium,
pqLow,
pqDraft or
pqDPI.
property XResolution: Word;
The x-resolution, in dots per inch, of the printer. This property is initialized only when PrintQuality is pqDPI.
property YResolution: Word;
The y-resolution, in dots per inch, of the printer. This property is initialized only when PrintQuality is pqDPI.
property Color: TPrintColor;
The color settings of the printer. The value can be pcColor or pcMonochrome.
property Duplex: TPrintDuplex;
Duplex or double-sided printing for printers capable of duplex printing. The value can be
pdSimplex,
pdHorizontal or
pdVertical.
property TrueType: TPrintTrueType;
Shows how TrueType fonts should be printed. The value can be
ttBitmap,
ttDownload,
ttDownloadOutline or
ttSubDev.
property Collate: Boolean;
Shows whether collation should be used when printing multiple copies.
property FormName: string;
The name of the form to use; for example, 'Letter' or 'Legal'.
property ICMMethod: TPrintICMMethod;
Shows how ICM is handled. For a non-ICM application, this member determines if ICM is enabled or disabled. For ICM applications, the system examines this member to determine how to handle ICM support. The value can be
imDisabled,
imHandledByWindows,
imHandledByDriver or
imHandledByDevice.
property ICMIntent: TPrintICMIntent;
Shows which color matching method, or intent, should be used by default. This member is primarily for non-ICM applications. ICM applications can establish intents by using the ICM functions. The value can be
iiABSColorimetric,
iiColorimetric,
iiContrast,
iiSaturate or
iiUser.
property MediaType: TPrintMediaType;
The type of media being printed on. The value can be
mtPlainPaper,
mtGlossyPaper or
mtTransparentFilm.
property DitherType: TPrintDitherType;
Shows how dithering is to be done. The value can be
dtNone,
dtCoarseBrush,
dtFineBrush,
dtLineArt or
dtGrayScale.
Printer Information component suite includes demo project that demonstrates main features of TPrinterInformation component:
Download free demo, order full source code right now!