Structs
Helper records:
TFloatRect = record
Left, Top, Right, Bottom: Extended;
end;
TFloatSize = record
X, Y: Extended;
end;
TATPrintFooter = record
Enabled: Boolean;
EnableLine: Boolean;
Caption: WideString;
FontName: TFontName;
FontSize: Integer;
FontStyle: TFontStyles;
FontColor: TColor;
FontCharset: TFontCharset;
end;
Printing options are specified in a record:
TATPrintOptions = record
Copies: Integer;
OptFit: TATPrintFitMode;
OptFitSize: TFloatSize;
OptPosition: TATPrintPosition;
OptMargins: TFloatRect;
OptUnit: TATPrintUnit;
OptGamma: Extended;
OptFooter: TATPrintFooter;
PixelsPerInch: Integer;
JobCaption: string;
FailOnErrors: Boolean;
end;
Fields are:
- Copies: Number of print copies.
- OptFit: State of the option "Fit mode". Possible values:
- pFitNormal: fit to page only large images
- pFitBest: fit also small images
- pFitStretch: stretch image to page
- pFitSize: set custom image size
- OptFitSize: Custom size for pFitSize fit mode.
- OptPosition: State of the option "Position". Possible values:
- pPosTopLeft
- pPosTop
- pPosTopRight
- pPosLeft
- pPosCenter
- pPosRight
- pPosBottomLeft
- pPosBottom
- pPosBottomRight
- OptMargins: State of the "Margins" option (Left, top, right, bottom).
- OptUnit: Units for margins and custom size:
- pUnitMm: millimeters
- pUnitCm: centimetres
- pUnitIn: inches
- OptGamma: Gamma correction value. Should be in 0.1...7.0, 1.0 means no gamma correction.
- OptFooter: Footer to print below image.
- PixelsPerInch: "Pixels per inch" value for the screen. Pass here the Screen.PixelsPerInch value.
- JobCaption: Caption of the job in the Print Manager.
- FailOnErrors: If set to True, then on preview errors the function will fail.
If set to False, then on preview errors the form will not be shown but the printing will start without questions.