OpenPetra
Free Administration Software for Non-Profits
|
this printer uses PdfSharp to print to PDF. More...
Public Types | |
enum | ePrinterBehaviour { eReport , eFormLetter } |
we have some different behaviour when printing the columns of a report and when printing a form letter More... | |
Public Member Functions | |
TPdfPrinter (ePrinterBehaviour APrinterBehaviour) | |
constructor More... | |
override void | SetPageFooterSpace (System.Int32 ANumberOfLines, eFont AFont) |
Set the space that is required by the page footer. ValidYPos will consider this value. More... | |
override float | LineFeedToPageFooter () |
Jump to the position where the page footer starts. SetPageFooterSpace is used to define the space reserved for the footer. More... | |
override Boolean | PrintString (String ATxt, eFont AFont, eAlignment AAlign) |
prints into the current line, aligned x position More... | |
override Boolean | PrintString (String ATxt, eFont AFont, float AXPos) |
prints into the current line, absolute x position More... | |
override Boolean | PrintString (String ATxt, eFont AFont, float AXPos, float AWidth, eAlignment AAlign) |
prints into the current line, absolute x position with width and alignment More... | |
override Boolean | DrawLine (float AXPos1, float AXPos2, eLinePosition ALinePosition, eFont AFont) |
Draws a line, either above or below the current text line the font is required to get the height of the row More... | |
override void | DrawLine (Int32 APenPixels, float AXPos1, float AYPos1, float AXPos2, float AYPos2) |
Draws a line, at specified position More... | |
override void | DrawRectangle (Int32 APenPixels, float AXPos, float AYPos, float AWidth, float AHeight) |
draw a rectangle More... | |
override void | DrawBitmap (string APath, float AXPos, float AYPos) |
draw a bitmap at the given position; the current position is moved More... | |
override void | DrawBitmap (string APath, float AXPos, float AYPos, float AWidth, float AHeight, float AWidthPercentage, float AHeightPercentage) |
draw a bitmap at the given position; the current position is moved More... | |
override float | GetWidthString (String ATxt, eFont AFont) |
prints into the current line, into the given column More... | |
override void | SaveState () |
save the state More... | |
override void | RestoreState () |
restore the state More... | |
override void | RotateAtTransform (double ADegrees, double XPos, double YPos) |
rotate the following output by some degrees, at the given position More... | |
override float | LineFeed (eFont AFont) |
Line Feed; increases the current y position by the height of the given font More... | |
override float | LineFeed () |
Line Feed; increases the current y position by the height of the biggest last used font More... | |
override float | LineSpaceFeed (eFont AFont) |
Line Feed, but not full line; increases the current y position by half the height of the given font More... | |
override float | LineUnFeed (eFont AFont) |
Reverse Line Feed; decreases the current y position by the height of the given font More... | |
override void | InsertDocument (string AFilename) |
insert another pdf into the current PDF More... | |
void | SavePDF (string AFilename) |
store a pdf to file. will check for paper size using the PrinterLayout. By default A4 is chosen More... | |
void | SavePDF (string AFilename, PaperKind APaperKind, Margins AMargins, float AWidthInPoint, float AHeightInPoint) |
store a pdf to a file. will call PrintPage automatically More... | |
override void | Init (eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) |
todoComment More... | |
override bool | PrintStringWrap (String ATxt, eFont AFont, float AXPos, float AWidth, eAlignment AAlign) |
prints into the current line, absolute x position with width and alignment this method uses FCurrentXPos and FCurrentYPos to be able to continue a paragraph uses FCurrentXPos and FCurrentYPos to know where to start to print, and also sets valid values in those member variables More... | |
override Boolean | PrintStringAndFits (String ATxt, eFont AFont, float AXPos, float AWidth, eAlignment AAlign) |
This function uses the normal DrawString function to print into a given space. It will return whether the text did fit that space or not. More... | |
float | LineFeed (float height) |
Line Feed; increases the current y position by the given height More... | |
override Boolean | ValidXPos (float APosition) |
Is the given position still on the page? More... | |
override Boolean | ValidYPos () |
Is the current line still on the page? More... | |
override void | SetHasMorePages (bool AHasMorePages) |
Tell the printer, that there are more pages coming More... | |
override bool | HasMorePages () |
more pages are coming More... | |
override float | Cm (float AValueInCm) |
Converts the given value in cm to the currently used measurement unit More... | |
override float | PixelHorizontal (float AWidth) |
convert pixels to inches or other unit used for output More... | |
override float | PixelVertical (float AHeight) |
convert pixels to inches or other unit used for output More... | |
void | StartSimulatePrinting () |
start the simulation of printing; nothing is actually printed, but the CurrentYPos is increased More... | |
void | FinishSimulatePrinting () |
finish the simulation of printing; the actual CurrentYPos is restored More... | |
void | PushCurrentState () |
store the current printer state (font size etc) More... | |
void | PopCurrentState () |
return to previous printer state; this is used for printing table cells More... | |
void | PopCurrentStateApartFromYPosition () |
return to previous printer state; but keep the new y position (used eg. for printing the page header) More... | |
float | Inch (float AValueInInch) |
Converts the given value in inch to the currently used measurement unit; uses Inch2Cm and Cm More... | |
virtual float | PrintTable (float AXPos, float AWidthAvailable, List< TTableRowGfx >rows, out Int32 ARowsFittingOnPage) |
renders a table at the current FCurrentYPos does not support rowspan at the moment colspan might be implemented in the generation of the TTableRowGfx structure does not care about fitting on page etc. More... | |
Static Public Member Functions | |
static void | ResetStaticVariables () |
reset the static variables for each Web Request call. More... | |
static float | Cm2Inch (float AValueInCm) |
Converts the given value in cm to the equivalent value in inches More... | |
static float | Inch2Cm (float AValueInInch) |
Converts the given value in inches to the equivalent value in centimeters More... | |
Public Attributes | |
XFont | FXDefaultFont |
todoComment More... | |
XFont | FXDefaultBoldFont |
todoComment More... | |
XFont | FXHeadingFont |
todoComment More... | |
XFont | FXSmallPrintFont |
todoComment More... | |
XFont | FXBarCodeFont |
for printing bar codes More... | |
XFont | FXBiggestLastUsedFont |
todoComment More... | |
ePrinterBehaviour | FPrinterBehaviour = ePrinterBehaviour.eReport |
we have some different behaviour when printing the columns of a report (can make text fit) and when printing a form letter More... | |
float | FPageXPos |
printing should be started at this position for each line More... | |
float | FPageWidthAvailable |
space available for printing More... | |
Static Public Attributes | |
const Int32 | DEFAULTPRINTERRESOLUTION = 300 |
default printer resolution More... | |
Protected Member Functions | |
override bool | UpdateBiggestLastUsedFont (eFont AFont) |
update the biggest last used font for the next line feed More... | |
void | PrintPage () |
print the page to PDF More... | |
String | GetFittedText (String ATxt, eFont AFont, float AWidth) |
Check if the text will fit into the given width. If yes, the text will be returned. If no, the text will be shortened and a "..." will be added to indicate that some text is missing. More... | |
String | CutTextToLength (String ATxt, eFont AFont, float AWidth) |
Cuts a given text so it will not extend the given width. More... | |
Int32 | GetTextLengthThatWillFit (String ATxt, eFont AFont, float AWidth) |
word wrap text, return the number of characters that fit the line width; if the first word does not fit the space available, wrap the word in itself More... | |
Protected Attributes | |
Stack< XGraphicsState > | FGraphicsStateStack = new Stack <XGraphicsState>() |
remember the rotation and transformation More... | |
float | FLinesPerPage |
these values are set by PrintPage More... | |
eOrientation | FOrientation |
todoComment More... | |
eMarginType | FMarginType |
use printable area or default margins More... | |
Int32 | FNumberOfPages |
todoComment More... | |
float | FPageFooterSpace |
how much space is needed for the footer lines; footerspace = font.height number of lines More... | |
float | FLeftMargin |
todoComment More... | |
float | FTopMargin |
todoComment More... | |
float | FRightMargin |
todoComment More... | |
float | FBottomMargin |
todoComment More... | |
float | FWidth |
todoComment More... | |
float | FHeight |
todoComment More... | |
TPrinterLayout | FPrinterLayout |
todoComment More... | |
TPrinterState | FCurrentState = new TPrinterState() |
current state of printer More... | |
PrintAction | FprintAction |
I can check whether I'm printing to a preview or a real printer. More... | |
Properties | |
System.Int32 | CurrentPageNr [get, set] |
todoComment More... | |
System.Int32 | CurrentDocumentNr [get, set] |
a document can consist of several pages; a document is one body element More... | |
System.Int32 | NumberOfPages [get, set] |
this only has a valid value after the first rendering of the report More... | |
float | CurrentYPos [get, set] |
todoComment More... | |
float | CurrentXPos [get, set] |
todoComment More... | |
float | AnchorXPos [get, set] |
other elements can be positioned relative to this position More... | |
float | AnchorYPos [get, set] |
other elements can be positioned relative to this position More... | |
float | LeftMargin [get] |
todoComment More... | |
float | RightMargin [get] |
todoComment More... | |
eFont | CurrentFont [get, set] |
todoComment More... | |
float | CurrentLineHeight [get, set] |
1 is the normal height of the font, CurrentLineHeight is multiplied with the height of the font More... | |
float | CurrentRelativeFontSize [get, set] |
the relative font size; 0 is default size More... | |
eAlignment | CurrentAlignment [get, set] |
todoComment More... | |
ePrintingMode | PrintingMode [get, set] |
this is about simulation or printing More... | |
float | Width [get] |
todoComment More... | |
float | PageFooterSpace [get] |
todoComment More... | |
this printer uses PdfSharp to print to PDF.
|
inherited |
|
inline |
constructor
|
inlinevirtualinherited |
Converts the given value in cm to the currently used measurement unit
Implements Ict.Common.Printing.TPrinter.
|
inlinestaticinherited |
Converts the given value in cm to the equivalent value in inches
|
inlineprotectedinherited |
Cuts a given text so it will not extend the given width.
ATxt | The text to cut |
AFont | The font used |
AWidth | The available length for the text in cm. |
|
inlinevirtual |
draw a bitmap at the given position; the current position is moved
APath | |
AXPos | |
AYPos |
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
draw a bitmap at the given position; the current position is moved
Either Width or WidthPercentage should be unequals 0, but only one should have a value. Same applies to Height
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
Draws a line, either above or below the current text line the font is required to get the height of the row
AXPos1 | |
AXPos2 | |
ALinePosition | |
AFont |
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
Draws a line, at specified position
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
draw a rectangle
APenPixels | |
AXPos | |
AYPos | |
AWidth | |
AHeight |
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlineinherited |
finish the simulation of printing; the actual CurrentYPos is restored
|
inlineprotectedinherited |
Check if the text will fit into the given width. If yes, the text will be returned. If no, the text will be shortened and a "..." will be added to indicate that some text is missing.
ATxt | the original text |
AFont | the font |
AWidth | the space available for the text in cm |
|
inlineprotectedinherited |
word wrap text, return the number of characters that fit the line width; if the first word does not fit the space available, wrap the word in itself
ATxt | |
AFont | |
AWidth |
|
inlinevirtual |
prints into the current line, into the given column
ATxt | |
AFont |
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtualinherited |
|
inlineinherited |
Converts the given value in inch to the currently used measurement unit; uses Inch2Cm and Cm
|
inlinestaticinherited |
Converts the given value in inches to the equivalent value in centimeters
|
inlinevirtualinherited |
todoComment
Reimplemented from Ict.Common.Printing.TPrinter.
|
inlinevirtual |
insert another pdf into the current PDF
AFilename |
Reimplemented from Ict.Common.Printing.TPrinter.
|
inlinevirtual |
Line Feed; increases the current y position by the height of the biggest last used font
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
Line Feed; increases the current y position by the height of the given font
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlineinherited |
Line Feed; increases the current y position by the given height
|
inlinevirtual |
Jump to the position where the page footer starts. SetPageFooterSpace is used to define the space reserved for the footer.
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
Line Feed, but not full line; increases the current y position by half the height of the given font
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
Reverse Line Feed; decreases the current y position by the height of the given font
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtualinherited |
convert pixels to inches or other unit used for output
AWidth |
Implements Ict.Common.Printing.TPrinter.
|
inlinevirtualinherited |
convert pixels to inches or other unit used for output
Implements Ict.Common.Printing.TPrinter.
|
inlineinherited |
return to previous printer state; this is used for printing table cells
|
inlineinherited |
return to previous printer state; but keep the new y position (used eg. for printing the page header)
|
inlineprotected |
print the page to PDF
|
inlinevirtual |
prints into the current line, aligned x position
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
prints into the current line, absolute x position
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtual |
prints into the current line, absolute x position with width and alignment
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtualinherited |
This function uses the normal DrawString function to print into a given space. It will return whether the text did fit that space or not.
ATxt | |
AFont | |
AXPos | |
AWidth | |
AAlign |
Implements Ict.Common.Printing.TPrinter.
|
inlinevirtualinherited |
prints into the current line, absolute x position with width and alignment this method uses FCurrentXPos and FCurrentYPos to be able to continue a paragraph uses FCurrentXPos and FCurrentYPos to know where to start to print, and also sets valid values in those member variables
Reimplemented from Ict.Common.Printing.TPrinter.
|
inlinevirtualinherited |
renders a table at the current FCurrentYPos does not support rowspan at the moment colspan might be implemented in the generation of the TTableRowGfx structure does not care about fitting on page etc.
AXPos | the X position to start the table |
AWidthAvailable | AWidthAvailable |
rows | |
ARowsFittingOnPage | number of rows that fitted on the page |
|
inlineinherited |
store the current printer state (font size etc)
|
inlinestatic |
reset the static variables for each Web Request call.
|
inlinevirtual |
restore the state
Reimplemented from Ict.Common.Printing.TPrinter.
|
inlinevirtual |
rotate the following output by some degrees, at the given position
Reimplemented from Ict.Common.Printing.TPrinter.
|
inline |
store a pdf to file. will check for paper size using the PrinterLayout. By default A4 is chosen
AFilename |
|
inline |
store a pdf to a file. will call PrintPage automatically
|
inlinevirtual |
save the state
Reimplemented from Ict.Common.Printing.TPrinter.
|
inlinevirtualinherited |
Tell the printer, that there are more pages coming
Implements Ict.Common.Printing.TPrinter.
|
inlinevirtual |
Set the space that is required by the page footer. ValidYPos will consider this value.
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlineinherited |
start the simulation of printing; nothing is actually printed, but the CurrentYPos is increased
|
inlineprotectedvirtual |
update the biggest last used font for the next line feed
AFont |
Reimplemented from Ict.Common.Printing.TGfxPrinter.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
staticinherited |
default printer resolution
|
protectedinherited |
todoComment
|
protectedinherited |
current state of printer
|
protected |
remember the rotation and transformation
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
protectedinherited |
these values are set by PrintPage
|
protectedinherited |
use printable area or default margins
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
protectedinherited |
how much space is needed for the footer lines; footerspace = font.height number of lines
|
inherited |
space available for printing
|
inherited |
printing should be started at this position for each line
|
protectedinherited |
I can check whether I'm printing to a preview or a real printer.
|
inherited |
we have some different behaviour when printing the columns of a report (can make text fit) and when printing a form letter
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
XFont Ict.Common.Printing.TPdfPrinter.FXBarCodeFont |
for printing bar codes
XFont Ict.Common.Printing.TPdfPrinter.FXBiggestLastUsedFont |
todoComment
XFont Ict.Common.Printing.TPdfPrinter.FXDefaultBoldFont |
todoComment
XFont Ict.Common.Printing.TPdfPrinter.FXDefaultFont |
todoComment
XFont Ict.Common.Printing.TPdfPrinter.FXHeadingFont |
todoComment
XFont Ict.Common.Printing.TPdfPrinter.FXSmallPrintFont |
todoComment
|
getsetinherited |
other elements can be positioned relative to this position
|
getsetinherited |
other elements can be positioned relative to this position
|
getsetinherited |
todoComment
|
getsetinherited |
a document can consist of several pages; a document is one body element
|
getsetinherited |
todoComment
|
getsetinherited |
1 is the normal height of the font, CurrentLineHeight is multiplied with the height of the font
|
getsetinherited |
todoComment
|
getsetinherited |
the relative font size; 0 is default size
|
getsetinherited |
todoComment
|
getsetinherited |
todoComment
|
getinherited |
todoComment
|
getsetinherited |
this only has a valid value after the first rendering of the report
|
getinherited |
todoComment
|
getsetinherited |
this is about simulation or printing
|
getinherited |
todoComment
|
getinherited |
todoComment