Class TPagePrinter (unit PagePrn) |
Inherits from
TScrollBox
constructor Create(Owner: TComponent);
- =============================================================================} { Public stuff for TPagePrinter.
procedure BeginDoc;
procedure BeginUpdate;
procedure Clear;
destructor Destroy;
Now setup the remaining properties which depend on the canvas.
procedure EndDoc;
Make extra sure we get the Font.
procedure EndUpdate;
function MeasureUnitsToPixelsH(const M: TMeasurement): TPixels;
function MeasureUnitsToPixelsV(const M: TMeasurement): TPixels;
function NewLine: Cardinal;
function NewPage: Cardinal;
function PixelsToMeasureUnitsH(const P: TPixels): TMeasurement;
function PixelsToMeasureUnitsV(const P: TPixels): TMeasurement;
function PrevLine: Boolean;
This function returns whether it was successful.
function Print: Boolean;
This type is only used in this function.
procedure RefreshProperties;
This must allow negatives for Lines.
procedure Write(const Line: String);
procedure WriteLine(const Line: String);
Now print the line.
procedure WriteLineAligned(const AAlignment: TAlignment; const Line: String);
Put spaces in for alignment purposes.
procedure WriteLines(const LinesAsTable: Boolean);
Draw the vertical lines.
procedure WriteTableLine(const Line: String);
procedure ZoomToFit;
We MUST set the page height and width before we create the canvas.
procedure ZoomToHeight;
procedure ZoomToWidth;
procedure ExpandFriendlyFormat(const UserFmt: String; AsHeader: Boolean);
function ExpandLogicalFields(S: String): String;
Protected declarations Width
function GetClippedLine(const Line: String; const Width: TPixels): String;
function GetPreviewPagePixels(Horz: Boolean): TPixels;
function GetPrinterHandle: HDC;
function GetScaleFactor(Horz: Boolean): Double;
procedure Invalidate;
procedure Loaded;
Center the page horizontally and go to top vertically.
function MeasureUnitsToScreenPixels(const Value: TMeasurement; Horz: Boolean): TPixels;
New stuff for TPagePrinter
procedure PaintPreview(Sender: TObject);
procedure ParseFormatToken(var CurToken: String; var CurAlignment: TAlignment; var CurWidth: TMeasurement);
OnPaint handler for TPaintBox
function ScaleValue(Value: TMeasurement; Horz: Boolean): TPixels;
procedure SetPixelsPerInch;
procedure SplitLine(var CurLine: String; var Buffer: String; const ClipWidth: TPixels; const TrimLastWhiteSpace: Boolean);
Print the PageBorders.
procedure SplitLineAndPrint(const Line: String; UseWrite: Boolean);
If the next character isn't whitespace, slide back to the nearest.
procedure UpdateDesigner;
procedure UpdatePagePreviewSize;
procedure UpdateProgressDlg(const Status: String; const CurrentPage, FromPage, ToPage: Cardinal);
function ValidateFormatString(const Fmt: String; const ConvertUnits: Boolean): String;
procedure WriteTableGrid(const CurWidth: TPixels; const TopGrid, BottomGrid: Boolean);
If we're not printing the Header or Footer, go to a new line.
procedure CMFontChanged(var Msg: TMessage);
Make it so the TPaintBox design time border is invisible.
procedure CreateTempPage;
procedure DoNewPageProcessing;
=============================================================================} { Private and Protected stuff for TPagePrinter.
procedure FinishPrintPage;
function GetAutoFooterFont: Boolean;
function GetAutoHeaderFont: Boolean;
function GetAvailablePageHeight: TMeasurement;
function GetAvailablePageWidth: TMeasurement;
function GetCanvas: TPrintCanvas;
function GetCanvasPosition: TPoint;
function GetCollate: Boolean;
function GetCopies: Cardinal;
function GetDefaultColWidth: TMeasurement;
function GetFileName: String;
function GetFooterFont: TFont;
function GetFooterFormat: String;
function GetFriendlyFooter: String;
Now set the header or footer properties.
function GetFriendlyHeader: String;
function GetGradientBackground: Boolean;
function GetGutterBottom: TMeasurement;
function GetGutterLeft: TMeasurement;
function GetGutterRight: TMeasurement;
function GetGutterTop: TMeasurement;
If it is visible, close it.
function GetHeaderFont: TFont;
I'd like to always Abort printing,
but I've found that calling Abort
multiple times will crash programs.
function GetHeaderFormat: String;
function GetLineNumber: Cardinal;
function GetLines: TStrings;
function GetLineSpacing: TLineSpacing;
function GetMarginBottom: TMeasurement;
function GetMarginLeft: TMeasurement;
function GetMarginRight: TMeasurement;
function GetMarginTop: TMeasurement;
function GetMeasureUnit: TMeasureUnit;
function GetOrientation: TPrinterOrientation;
function GetPageBorderOffset: TMeasurement;
function GetPageBorders: TPageBorders;
function GetPageCount: Cardinal;
Leave the pen so the TPaintBox} {design time border doesn't show.
function GetPageNumber: Cardinal;
function GetPages(Indx: Cardinal): TPrintPage;
function GetPhysicalPageHeight: TMeasurement;
function GetPhysicalPageWidth: TMeasurement;
function GetPreviewPagePixelsH: TPixels;
function GetPreviewPagePixelsV: TPixels;
function GetPrintableHeight: TMeasurement;
function GetPrintableWidth: TMeasurement;
function GetPrintFromPage: Cardinal;
function GetPrinting: Boolean;
function GetPrintToFile: Boolean;
function GetPrintToPage: Cardinal;
function GetProgressMessage: String;
function GetShadowColor: TColor;
function GetShadowOffset: TPixels;
function GetShowCancel: Boolean;
function GetShowMargins: Boolean;
function GetShowProgress: Boolean;
function GetTableFormat: String;
function GetTitle: String;
function GetZoomPercent: Cardinal;
procedure NewPrintPage;
Create a new page so all the Canvas functions work.
procedure OnCancelPrinting(Sender: TObject);
function PixelPrintHeight: TPixels;
function PixelPrintWidth: TPixels;
procedure ResetPageList(CreateForReal: Boolean);
procedure SetAutoFooterFont(Value: Boolean);
procedure SetAutoHeaderFont(Value: Boolean);
procedure SetCollate(Value: Boolean);
procedure SetCopies(Value: Cardinal);
procedure SetDefaultColWidth(Value: TMeasurement);
procedure SetFileName(Value: String);
procedure SetFooterFont(Value: TFont);
procedure SetFooterFormat(Value: String);
procedure SetFriendlyFooter(Value: String);
procedure SetFriendlyHeader(Value: String);
procedure SetGradientBackground(Value: Boolean);
procedure SetHeaderFont(Value: TFont);
procedure SetHeaderFormat(Value: String);
procedure SetLines(Value: TStrings);
I have to do Check/Create here because C++Builder} {1.
procedure SetLineSpacing(Value: TLineSpacing);
Update the measurements if the units have changed.
procedure SetMarginBottom(Value: TMeasurement);
procedure SetMarginLeft(Value: TMeasurement);
procedure SetMarginRight(Value: TMeasurement);
procedure SetMarginTop(Value: TMeasurement);
This routine gets us around the Delphi tiny font bug.
procedure SetMeasureUnit(Value: TMeasureUnit);
procedure SetOrientation(Value: TPrinterOrientation);
procedure SetPageBorderOffset(Value: TMeasurement);
procedure SetPageBorders(Value: TPageBorders);
procedure SetPageNumber(Value: Cardinal);
procedure SetPrintFromPage(Value: Cardinal);
procedure SetPrintToFile(Value: Boolean);
procedure SetPrintToPage(Value: Cardinal);
procedure SetProgressMessage(Value: String);
procedure SetShadowColor(Value: TColor);
Force fLineSpace to be updated.
procedure SetShadowOffset(Value: TPixels);
procedure SetShowCancel(Value: Boolean);
procedure SetShowMargins(Value: Boolean);
procedure SetShowProgress(Value: Boolean);
procedure SetTableFormat(Value: String);
procedure SetTitle(Value: String);
procedure SetZoomPercent(Value: Cardinal);
C++Builder 1.
function StartingBottom: TPixels;
function StartingLeft: TPixels;
function StartingRight: TPixels;
function StartingTop: TPixels;
function StoreFooterAndFormat: Boolean;
function StoreFooterFont: Boolean;
function StoreHeaderAndFormat: Boolean;
function StoreHeaderFont: Boolean;
property AbortOnCancel : Boolean
property Align :
property Alignment : TAlignment
property AutoFooterFont : Boolean
property AutoHeaderFont : Boolean
property Collate : Boolean
property Color :
property Copies : Cardinal
property DefaultColWidth : TMeasurement
property DragCursor :
property DragMode :
property Enabled :
property FileName : String
property Footer : String
property FooterFont : TFont
property FooterFormat : String
property FriendlyFooter : String
property FriendlyHeader : String
property GradientBackground : Boolean
property Header : String
property HeaderFont : TFont
property HeaderFormat : String
property Lines : TStrings
property LineSpacing : TLineSpacing
property MarginBottom : TMeasurement
property MarginLeft : TMeasurement
property MarginRight : TMeasurement
property MarginTop : TMeasurement
property MeasureUnit : TMeasureUnit
Published declarations } {Because everything in TPagePrinter depends on it, this property MUST be the first
TPagePrinter-specific property loaded.
property Orientation : TPrinterOrientation
property PageBorderOffset : TMeasurement
property PageBorders : TPageBorders
property ParentColor :
property ParentFont :
property PrintToFile : Boolean
property ProgressMessage : String
property ShadowColor : TColor
property ShadowOffset : TPixels
property ShowCancel : Boolean
property ShowHint :
property ShowMargins : Boolean
property ShowProgress : Boolean
property TableFormat : String
property TableGrid : Boolean
property TabSize : Cardinal
property Title : String
property TokenSeparator : Char
property Visible :
property WordWrap : Boolean
property ZoomLocation : TZoomLocation
property ZoomPercent : Cardinal
property AvailablePageHeight : TMeasurement
Public declarations } {Largest printable space on the page.
property AvailablePageWidth : TMeasurement
property Canvas : TPrintCanvas
property CanvasPosition : TPoint
property GutterBottom : TMeasurement
property GutterLeft : TMeasurement
property GutterRight : TMeasurement
property GutterTop : TMeasurement
property LineNumber : Cardinal
property PageCount : Cardinal
property PageNumber : Cardinal
property Pages : TPrintPage
property PhysicalPageHeight : TMeasurement
property PhysicalPageWidth : TMeasurement
property PrintableHeight : TMeasurement
Printable space bounded by the margins.
property PrintableWidth : TMeasurement
property PrintFromPage : Cardinal
property Printing : Boolean
property PrintToPage : Cardinal
event OnGetCellFormat : TGetCellFormatEvent
event OnNewLine : TNotifyEvent
event OnNewPage : TNotifyEvent
event OnStartDrag :
fAbortOnCancel : Boolean;
Private declarations
fAlignment : TAlignment;
fAutoFooterFont : Boolean;
fAutoHeaderFont : Boolean;
fCancelPrinting : Boolean;
fCanvas : TPrintCanvas;
fCollate : Boolean;
fCopies : Cardinal;
fCurrentX : Integer;
These X,Y are relative to the printable space.
fCurrentY : Integer;
fDefaultColWidth : TMeasurement;
fFileName : String;
fFileVar : TextFile;
fFooter : String;
fFooterFont : TFont;
fFooterFormat : String;
fFriendlyFooter : String;
fFriendlyHeader : String;
fGradientBackground : Boolean;
fHeader : String;
fHeaderFont : TFont;
fHeaderFormat : String;
fLineNumber : Cardinal;
fLines : TStrings;
fLineSpace : TPixels;
fLineSpacing : TLineSpacing;
fMarginBottom : TMeasurement;
fMarginLeft : TMeasurement;
fMarginRight : TMeasurement;
fMarginTop : TMeasurement;
fMeasureUnit : TMeasureUnit;
fOnGetCellFormat : TGetCellFormatEvent;
fOnNewLine : TNotifyEvent;
fOnNewPage : TNotifyEvent;
fPage : TPrintPage;
fPageBorderOffset : TMeasurement;
fPageBorders : TPageBorders;
fPageNumber : Cardinal;
fPages : TPageList;
fPaintBox : TPaintBox;
fPPPrnPrgDlg : TPPPrnPrgDlg;
fPrinter : TPrinter;
fPrintFromPage : Cardinal;
fPrinting : Boolean;
fPrintingHeaderOrFooter : Boolean;
fPrintingToFile : Boolean;
fPrintToFile : Boolean;
fPrintToPage : Cardinal;
fProgressMessage : String;
fShadowColor : TColor;
fShadowOffset : TPixels;
fShowCancel : Boolean;
fShowMargins : Boolean;
fShowProgress : Boolean;
fStillCreating : Boolean;
fTableFormat : String;
fTableGrid : Boolean;
fTabSize : Cardinal;
fTextMetrics : TTextMetric;
fTokenSeparator : Char;
fUpdateRefCount : Cardinal;
fUsingTempPage : Boolean;
fWordWrap : Boolean;
fZoomLocation : TZoomLocation;
fZoomPercent : Cardinal;
constructor Create(Owner: TComponent);
=============================================================================} { Public stuff for TPagePrinter. } {=============================================================================
procedure BeginDoc;
procedure BeginUpdate;
procedure Clear;
destructor Destroy;
Now setup the remaining properties which depend on the canvas.
procedure EndDoc;
Make extra sure we get the Font.PixelsPerInch} {property set correctly.
procedure EndUpdate;
function MeasureUnitsToPixelsH(const M: TMeasurement): TPixels;
function MeasureUnitsToPixelsV(const M: TMeasurement): TPixels;
function NewLine: Cardinal;
function NewPage: Cardinal;
function PixelsToMeasureUnitsH(const P: TPixels): TMeasurement;
function PixelsToMeasureUnitsV(const P: TPixels): TMeasurement;
function PrevLine: Boolean;
This function returns whether it was successful.
function Print: Boolean;
This type is only used in this function.
procedure RefreshProperties;
This must allow negatives for Lines.Count-1
procedure Write(const Line: String);
procedure WriteLine(const Line: String);
Now print the line.
procedure WriteLineAligned(const AAlignment: TAlignment; const Line: String);
Put spaces in for alignment purposes.
procedure WriteLines(const LinesAsTable: Boolean);
Draw the vertical lines.
procedure WriteTableLine(const Line: String);
procedure ZoomToFit;
We MUST set the page height and width before we create the canvas.
procedure ZoomToHeight;
procedure ZoomToWidth;
procedure ExpandFriendlyFormat(const UserFmt: String; AsHeader: Boolean);
function ExpandLogicalFields(S: String): String;
Protected declarations
Width
function GetClippedLine(const Line: String; const Width: TPixels): String;
function GetPreviewPagePixels(Horz: Boolean): TPixels;
function GetPrinterHandle: HDC;
function GetScaleFactor(Horz: Boolean): Double;
procedure Invalidate;
procedure Loaded;
Center the page horizontally and go to top vertically.
function MeasureUnitsToScreenPixels(const Value: TMeasurement; Horz: Boolean): TPixels;
New stuff for TPagePrinter
procedure PaintPreview(Sender: TObject);
procedure ParseFormatToken(var CurToken: String; var CurAlignment: TAlignment; var CurWidth: TMeasurement);
OnPaint handler for TPaintBox
function ScaleValue(Value: TMeasurement; Horz: Boolean): TPixels;
procedure SetPixelsPerInch;
procedure SplitLine(var CurLine: String; var Buffer: String; const ClipWidth: TPixels; const TrimLastWhiteSpace: Boolean);
Print the PageBorders.
procedure SplitLineAndPrint(const Line: String; UseWrite: Boolean);
If the next character isn't whitespace, slide back to the nearest.
Also, like most word processors do, I'm going to delete the
first leading whitespace character left in the next-line buffer after
the delete/newline (if one exists).
procedure UpdateDesigner;
procedure UpdatePagePreviewSize;
procedure UpdateProgressDlg(const Status: String; const CurrentPage, FromPage, ToPage: Cardinal);
function ValidateFormatString(const Fmt: String; const ConvertUnits: Boolean): String;
procedure WriteTableGrid(const CurWidth: TPixels; const TopGrid, BottomGrid: Boolean);
If we're not printing the Header or Footer, go to a new line.} {if ((fCurrentY >= 0) and (fCurrentY < PixelPrintHeight)) or
procedure CMFontChanged(var Msg: TMessage);
Make it so the TPaintBox design time border is invisible.
procedure CreateTempPage;
procedure DoNewPageProcessing;
=============================================================================} { Private and Protected stuff for TPagePrinter. } {=============================================================================
procedure FinishPrintPage;
function GetAutoFooterFont: Boolean;
function GetAutoHeaderFont: Boolean;
function GetAvailablePageHeight: TMeasurement;
function GetAvailablePageWidth: TMeasurement;
function GetCanvas: TPrintCanvas;
function GetCanvasPosition: TPoint;
function GetCollate: Boolean;
function GetCopies: Cardinal;
function GetDefaultColWidth: TMeasurement;
function GetFileName: String;
function GetFooterFont: TFont;
function GetFooterFormat: String;
function GetFriendlyFooter: String;
Now set the header or footer properties.
function GetFriendlyHeader: String;
function GetGradientBackground: Boolean;
function GetGutterBottom: TMeasurement;
function GetGutterLeft: TMeasurement;
function GetGutterRight: TMeasurement;
function GetGutterTop: TMeasurement;
If it is visible, close it.
function GetHeaderFont: TFont;
I'd like to always Abort printing,
but I've found that calling Abort
multiple times will crash programs.
Thus you can optionally use EndDoc.
function GetHeaderFormat: String;
function GetLineNumber: Cardinal;
function GetLines: TStrings;
function GetLineSpacing: TLineSpacing;
function GetMarginBottom: TMeasurement;
function GetMarginLeft: TMeasurement;
function GetMarginRight: TMeasurement;
function GetMarginTop: TMeasurement;
function GetMeasureUnit: TMeasureUnit;
function GetOrientation: TPrinterOrientation;
function GetPageBorderOffset: TMeasurement;
function GetPageBorders: TPageBorders;
function GetPageCount: Cardinal;
Leave the pen so the TPaintBox} {design time border doesn't show.
function GetPageNumber: Cardinal;
function GetPages(Indx: Cardinal): TPrintPage;
function GetPhysicalPageHeight: TMeasurement;
function GetPhysicalPageWidth: TMeasurement;
function GetPreviewPagePixelsH: TPixels;
function GetPreviewPagePixelsV: TPixels;
function GetPrintableHeight: TMeasurement;
function GetPrintableWidth: TMeasurement;
function GetPrintFromPage: Cardinal;
function GetPrinting: Boolean;
function GetPrintToFile: Boolean;
function GetPrintToPage: Cardinal;
function GetProgressMessage: String;
function GetShadowColor: TColor;
function GetShadowOffset: TPixels;
function GetShowCancel: Boolean;
function GetShowMargins: Boolean;
function GetShowProgress: Boolean;
function GetTableFormat: String;
function GetTitle: String;
function GetZoomPercent: Cardinal;
procedure NewPrintPage;
Create a new page so all the Canvas functions work.
procedure OnCancelPrinting(Sender: TObject);
function PixelPrintHeight: TPixels;
function PixelPrintWidth: TPixels;
procedure ResetPageList(CreateForReal: Boolean);
procedure SetAutoFooterFont(Value: Boolean);
procedure SetAutoHeaderFont(Value: Boolean);
procedure SetCollate(Value: Boolean);
procedure SetCopies(Value: Cardinal);
procedure SetDefaultColWidth(Value: TMeasurement);
procedure SetFileName(Value: String);
procedure SetFooterFont(Value: TFont);
procedure SetFooterFormat(Value: String);
procedure SetFriendlyFooter(Value: String);
procedure SetFriendlyHeader(Value: String);
procedure SetGradientBackground(Value: Boolean);
procedure SetHeaderFont(Value: TFont);
procedure SetHeaderFormat(Value: String);
procedure SetLines(Value: TStrings);
I have to do Check/Create here because C++Builder} {1.0 kept giving access violations if I didn't...
procedure SetLineSpacing(Value: TLineSpacing);
Update the measurements if the units have changed.
procedure SetMarginBottom(Value: TMeasurement);
procedure SetMarginLeft(Value: TMeasurement);
procedure SetMarginRight(Value: TMeasurement);
procedure SetMarginTop(Value: TMeasurement);
This routine gets us around the Delphi tiny font bug.
procedure SetMeasureUnit(Value: TMeasureUnit);
procedure SetOrientation(Value: TPrinterOrientation);
procedure SetPageBorderOffset(Value: TMeasurement);
procedure SetPageBorders(Value: TPageBorders);
procedure SetPageNumber(Value: Cardinal);
procedure SetPrintFromPage(Value: Cardinal);
procedure SetPrintToFile(Value: Boolean);
procedure SetPrintToPage(Value: Cardinal);
procedure SetProgressMessage(Value: String);
procedure SetShadowColor(Value: TColor);
Force fLineSpace to be updated.
procedure SetShadowOffset(Value: TPixels);
procedure SetShowCancel(Value: Boolean);
procedure SetShowMargins(Value: Boolean);
procedure SetShowProgress(Value: Boolean);
procedure SetTableFormat(Value: String);
procedure SetTitle(Value: String);
procedure SetZoomPercent(Value: Cardinal);
C++Builder 1.0 doesn't like Cardinal properties
(or String properties) with a SetXXX procedure and
no GetXXX function. It will always read 0 in that
situation. However, Cardinal properties with no
Get and no Set as well as properties with both
Get and Set functions work. Thus the existence
of this little function.
function StartingBottom: TPixels;
function StartingLeft: TPixels;
function StartingRight: TPixels;
function StartingTop: TPixels;
function StoreFooterAndFormat: Boolean;
function StoreFooterFont: Boolean;
function StoreHeaderAndFormat: Boolean;
function StoreHeaderFont: Boolean;
property AbortOnCancel : Boolean
property Align :
property Alignment : TAlignment
property AutoFooterFont : Boolean
property AutoHeaderFont : Boolean
property Collate : Boolean
property Color :
property Copies : Cardinal
property DefaultColWidth : TMeasurement
property DragCursor :
property DragMode :
property Enabled :
property FileName : String
property Footer : String
property FooterFont : TFont
property FooterFormat : String
property FriendlyFooter : String
property FriendlyHeader : String
property GradientBackground : Boolean
property Header : String
property HeaderFont : TFont
property HeaderFormat : String
property Lines : TStrings
property LineSpacing : TLineSpacing
property MarginBottom : TMeasurement
property MarginLeft : TMeasurement
property MarginRight : TMeasurement
property MarginTop : TMeasurement
property MeasureUnit : TMeasureUnit
Published declarations } {Because everything in TPagePrinter depends on it, this property MUST be the first
TPagePrinter-specific property loaded. If you edit the form as text and move it
around in the streaming order, things may not work correctly. This dependency kind
of stinks, but I can't think of any way around it. Sorry.
property Orientation : TPrinterOrientation
property PageBorderOffset : TMeasurement
property PageBorders : TPageBorders
property ParentColor :
property ParentFont :
property PrintToFile : Boolean
property ProgressMessage : String
property ShadowColor : TColor
property ShadowOffset : TPixels
property ShowCancel : Boolean
property ShowHint :
property ShowMargins : Boolean
property ShowProgress : Boolean
property TableFormat : String
property TableGrid : Boolean
property TabSize : Cardinal
property Title : String
property TokenSeparator : Char
property Visible :
property WordWrap : Boolean
property ZoomLocation : TZoomLocation
property ZoomPercent : Cardinal
property AvailablePageHeight : TMeasurement
Public declarations } {Largest printable space on the page.
property AvailablePageWidth : TMeasurement
property Canvas : TPrintCanvas
property CanvasPosition : TPoint
property GutterBottom : TMeasurement
property GutterLeft : TMeasurement
property GutterRight : TMeasurement
property GutterTop : TMeasurement
property LineNumber : Cardinal
property PageCount : Cardinal
property PageNumber : Cardinal
property Pages : TPrintPage
property PhysicalPageHeight : TMeasurement
property PhysicalPageWidth : TMeasurement
property PrintableHeight : TMeasurement
Printable space bounded by the margins.
property PrintableWidth : TMeasurement
property PrintFromPage : Cardinal
property Printing : Boolean
property PrintToPage : Cardinal
event OnGetCellFormat : TGetCellFormatEvent
event OnNewLine : TNotifyEvent
event OnNewPage : TNotifyEvent
event OnStartDrag :
fAbortOnCancel : Boolean;
Private declarations
fAlignment : TAlignment;
fAutoFooterFont : Boolean;
fAutoHeaderFont : Boolean;
fCancelPrinting : Boolean;
fCanvas : TPrintCanvas;
fCollate : Boolean;
fCopies : Cardinal;
fCurrentX : Integer;
These X,Y are relative to the printable space.
They should normally be bounded by the Margins.
So 0,0 is the left,top corner of the printable space.
fCurrentY is negative only when printing the header.
fCurrentY : Integer;
fDefaultColWidth : TMeasurement;
fFileName : String;
fFileVar : TextFile;
fFooter : String;
fFooterFont : TFont;
fFooterFormat : String;
fFriendlyFooter : String;
fFriendlyHeader : String;
fGradientBackground : Boolean;
fHeader : String;
fHeaderFont : TFont;
fHeaderFormat : String;
fLineNumber : Cardinal;
fLines : TStrings;
fLineSpace : TPixels;
fLineSpacing : TLineSpacing;
fMarginBottom : TMeasurement;
fMarginLeft : TMeasurement;
fMarginRight : TMeasurement;
fMarginTop : TMeasurement;
fMeasureUnit : TMeasureUnit;
fOnGetCellFormat : TGetCellFormatEvent;
fOnNewLine : TNotifyEvent;
fOnNewPage : TNotifyEvent;
fPage : TPrintPage;
fPageBorderOffset : TMeasurement;
fPageBorders : TPageBorders;
fPageNumber : Cardinal;
fPages : TPageList;
fPaintBox : TPaintBox;
fPPPrnPrgDlg : TPPPrnPrgDlg;
fPrinter : TPrinter;
fPrintFromPage : Cardinal;
fPrinting : Boolean;
fPrintingHeaderOrFooter : Boolean;
fPrintingToFile : Boolean;
fPrintToFile : Boolean;
fPrintToPage : Cardinal;
fProgressMessage : String;
fShadowColor : TColor;
fShadowOffset : TPixels;
fShowCancel : Boolean;
fShowMargins : Boolean;
fShowProgress : Boolean;
fStillCreating : Boolean;
fTableFormat : String;
fTableGrid : Boolean;
fTabSize : Cardinal;
fTextMetrics : TTextMetric;
fTokenSeparator : Char;
fUpdateRefCount : Cardinal;
fUsingTempPage : Boolean;
fWordWrap : Boolean;
fZoomLocation : TZoomLocation;
fZoomPercent : Cardinal;