Class PrintOutPDFBase
Report preocessing driver, capable of generate Adobe PDF files
Implements
Inherited Members
Namespace: Reportman.Drawing
Assembly: Reportman.Drawing.dll
Syntax
public abstract class PrintOutPDFBase : PrintOut, IDisposable
Constructors
View SourcePrintOutPDFBase()
Constructo and initialization
Declaration
public PrintOutPDFBase()
Fields
View SourceCalculateOnly
The pdf is not generated but all size calculations are done
Declaration
public bool CalculateOnly
Field Value
| Type | Description |
|---|---|
| bool |
Compressed
The resulting PDF file can be compressed to reduce the file size
Declaration
public bool Compressed
Field Value
| Type | Description |
|---|---|
| bool |
FileName
Destination file where the Adobe PDF format file will be saved
Declaration
public string FileName
Field Value
| Type | Description |
|---|---|
| string |
Properties
View SourceForceComplexShaping
Routes to PDFCanvas.ForceComplexShaping. When true, TextExtent/TextExtentLineInfo always populate LineInfo.Glyphs by going through the DirectWrite/HarfBuzz shaper, even for plain (non-HTML, non-RTL) text. Required for callers that need glyph-indexed rendering (e.g. ExtTextOutW with ETO_GLYPH_INDEX) on plain text.
Declaration
public bool ForceComplexShaping { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
LineInfo
Declaration
public List<LineInfo> LineInfo { get; }
Property Value
| Type | Description |
|---|---|
| List<LineInfo> |
PDFConformance
Declaration
public PDFConformanceType PDFConformance { get; set; }
Property Value
| Type | Description |
|---|---|
| PDFConformanceType |
PDFStream
In memory stream containing the Adobe PDF format file
Declaration
public Stream PDFStream { get; }
Property Value
| Type | Description |
|---|---|
| Stream |
Methods
View SourceDispose()
Free memory consumed by graphics resources
Declaration
public override void Dispose()
Overrides
View SourceDrawObject(MetaPage, MetaObject)
Draw an object to the PDF file
Declaration
public void DrawObject(MetaPage page, MetaObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaPage | page | MetaPage conatining the object |
| MetaObject | obj | Object to be drawn |
DrawPage(MetaFile, MetaPage)
Draw all objects of the page to current PDF file page
Declaration
public override void DrawPage(MetaFile meta, MetaPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta | MetaFile containing the page |
| MetaPage | page | MetaPage to be drawn |
Overrides
View SourceEndDocument(MetaFile)
Finalization
Declaration
public override void EndDocument(MetaFile meta)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta | MetaFile to process |
Overrides
View SourceGetBitmapInfoProvider()
Declaration
public abstract IBitmapInfoProvider GetBitmapInfoProvider()
Returns
| Type | Description |
|---|---|
| IBitmapInfoProvider |
GetFontInfoProvider()
Declaration
public abstract FontInfoProvider GetFontInfoProvider()
Returns
| Type | Description |
|---|---|
| FontInfoProvider |
GetPageSize(out int)
Get page size
Declaration
public override Point GetPageSize(out int indexqt)
Parameters
| Type | Name | Description |
|---|---|---|
| int | indexqt | Output parameters, index for PageSizeArray |
Returns
| Type | Description |
|---|---|
| Point | Page size in twips |
Overrides
View SourceGraphicExtent(MemoryStream, Point, int)
Obtain graphic extent
Declaration
public override Point GraphicExtent(MemoryStream astream, Point extent, int dpi)
Parameters
| Type | Name | Description |
|---|---|---|
| MemoryStream | astream | Stream containing a bitmap or a Jpeg image |
| Point | extent | Initial bounding box |
| int | dpi | Resolution in Dots per inch of the image |
Returns
| Type | Description |
|---|---|
| Point | Size in twips of the image |
Overrides
View SourceNewDocument(MetaFile)
Initialization
Declaration
public override void NewDocument(MetaFile meta)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta | MetaFile to process |
Overrides
View SourceNewPage(MetaFile, MetaPage)
Creates a new page
Declaration
public override void NewPage(MetaFile meta, MetaPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta | |
| MetaPage | page |
Overrides
View SourcePreparePrint(MetaFile)
Layout (BeginPrint) runs before NewDocument, so the shaper must be forced here too: otherwise line breaks would be computed with the simple metrics and then drawn with the shaped ones.
Declaration
public override bool PreparePrint(MetaFile meta)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
View SourcePrint(MetaFile)
Generate the PDF file in a single pass
Declaration
public override bool Print(MetaFile meta)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
View SourceSetOrientation(OrientationType)
Sets page orientation
Declaration
public override void SetOrientation(OrientationType PageOrientation)
Parameters
| Type | Name | Description |
|---|---|---|
| OrientationType | PageOrientation | Input value |
Overrides
View SourceSetPageSize(PageSizeDetail)
Sets page size
Declaration
public override Point SetPageSize(PageSizeDetail psize)
Parameters
| Type | Name | Description |
|---|---|---|
| PageSizeDetail | psize | Input value |
Returns
| Type | Description |
|---|---|
| Point | Size in twips of the page |
Overrides
View SourceTextExtent(TextObjectStruct, Point)
Obtain text extent
Declaration
public override Point TextExtent(TextObjectStruct aobj, Point extent)
Parameters
| Type | Name | Description |
|---|---|---|
| TextObjectStruct | aobj | |
| Point | extent |
Returns
| Type | Description |
|---|---|
| Point |
Overrides
View SourceTextExtentLineInfo(TextObjectStruct, Point)
Obtain text extent, fills LineInfo (original signature for backward compatibility)
Declaration
public Point TextExtentLineInfo(TextObjectStruct aobj, Point extent)
Parameters
| Type | Name | Description |
|---|---|---|
| TextObjectStruct | aobj | |
| Point | extent |
Returns
| Type | Description |
|---|---|
| Point |
TextExtentLineInfo(TextObjectStruct, ref Point)
Obtain text extent and return LineInfo list directly
Declaration
public override List<LineInfo> TextExtentLineInfo(TextObjectStruct aobj, ref Point extent)
Parameters
| Type | Name | Description |
|---|---|---|
| TextObjectStruct | aobj | |
| Point | extent |
Returns
| Type | Description |
|---|---|
| List<LineInfo> |
Overrides
View SourceWordExtent(string, Point)
Obtain word extent using current settings
Declaration
public Point WordExtent(string text, Point extent)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| Point | extent |
Returns
| Type | Description |
|---|---|
| Point |
WordExtentLineInfo(string, ref Point, bool)
Same measurement WordExtent performs, but returning the shaped LineInfo so the caller can reproduce the word glyph by glyph (glyph-exact justified printing). Uses the current canvas font, set by a previous TextExtentLineInfo call.
Declaration
public List<LineInfo> WordExtentLineInfo(string text, ref Point extent, bool rightToLeft = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| Point | extent | |
| bool | rightToLeft |
Returns
| Type | Description |
|---|---|
| List<LineInfo> |