API Reference
PdfPageCanvas
Builds foreground page content at absolute top-left page coordinates in the order items are added.
Inheritance
- Object
- PdfPageCanvas
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method PdfPageCanvas.ActualText
- Method PdfPageCanvas.Clip
- Method PdfPageCanvas.Clip
- Method PdfPageCanvas.Drawing
- Method PdfPageCanvas.Effect
- Method PdfPageCanvas.Figure
- Method PdfPageCanvas.FreeTextAnnotation
- Method PdfPageCanvas.HighlightAnnotation
- Method PdfPageCanvas.Image
- Method PdfPageCanvas.Outline
- Method PdfPageCanvas.Shape
- Method PdfPageCanvas.Structure
- Method PdfPageCanvas.Table
- Method PdfPageCanvas.Table
- Method PdfPageCanvas.Table
- Method PdfPageCanvas.Table
- Method PdfPageCanvas.Table
- Method PdfPageCanvas.Table
- Method PdfPageCanvas.Text
- Method PdfPageCanvas.Text
- Method PdfPageCanvas.Text
- Method PdfPageCanvas.TextAnnotation
- Method PdfPageCanvas.TextBox
- Method PdfPageCanvas.TextBox
- Method PdfPageCanvas.TextBox
- Method PdfPageCanvas.TextBox
- Method PdfPageCanvas.TextBox
- Method PdfPageCanvas.TextBox
Accepted by parameters
- Method PdfDocument.Canvas
- Method PdfDocumentStamper.Content
- Method PdfDocumentStamper.Content
- Method PdfDocumentStamper.TryContent
- Method PdfPageCanvas.ActualText
- Method PdfPageCanvas.Clip
- Method PdfPageCanvas.Clip
- Method PdfPageCanvas.Effect
- Method PdfPageCanvas.Figure
- Method PdfPageCanvas.Structure
- Method PdfPageCompose.Canvas
Constructors
public PdfPageCanvas() #Creates an empty absolute-positioning page canvas.
Methods
public PdfPageCanvas ActualText(String text, Action<PdfPageCanvas> build) #PdfPageCanvasGroups positioned text fragments under one logical replacement string for extraction and accessibility. Child paint remains unchanged while readers that honor ActualText receive the supplied logical text once.
Parameters
- text System.String
- build System.Action{OfficeIMO.Pdf.PdfPageCanvas}
public PdfPageCanvas Clip(Double x, Double y, Double width, Double height, Action<PdfPageCanvas> build) #PdfPageCanvasAdds a clipped fixed-position canvas frame using top-left page coordinates.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- build System.Action{OfficeIMO.Pdf.PdfPageCanvas}
public PdfPageCanvas Clip(Double x, Double y, OfficeClipPath clipPath, Action<PdfPageCanvas> build) #PdfPageCanvasAdds a path-clipped fixed-position canvas frame using top-left page coordinates.
Parameters
- x System.Double
- y System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- build System.Action{OfficeIMO.Pdf.PdfPageCanvas}
public PdfPageCanvas Drawing(OfficeDrawing drawing, Double x, Double y, Double width, Double height, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null, Double rotationAngle = 0) #PdfPageCanvasAdds a shared vector drawing inside a fixed page rectangle using top-left page coordinates.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfDrawingStyle = null
- linkUri System.String = null
- linkContents System.String = null
- rotationAngle System.Double = 0
public PdfPageCanvas Effect(OfficeTransform transform, Double opacity, Action<PdfPageCanvas> build) #PdfPageCanvasAdds nested canvas content through one top-left-coordinate affine transform and opacity state.
Parameters
- transform OfficeIMO.Drawing.OfficeTransform
- opacity System.Double
- build System.Action{OfficeIMO.Pdf.PdfPageCanvas}
public PdfPageCanvas Figure(String alternativeText, Action<PdfPageCanvas> build) #PdfPageCanvasGroups absolute canvas content as one tagged figure with alternative text.
Parameters
- alternativeText System.String
- build System.Action{OfficeIMO.Pdf.PdfPageCanvas}
public PdfPageCanvas FreeTextAnnotation(String contents, Double x, Double y, Double width, Double height, Double fontSize = 10, Nullable<PdfColor> textColor = null, Nullable<PdfColor> borderColor = null, Double borderWidth = 1, Nullable<PdfColor> fillColor = null, PdfAlign textAlign = Left, Double padding = 3, Nullable<Double> lineHeight = null) #PdfPageCanvasAdds a PDF free-text annotation at fixed top-left page coordinates.
Parameters
- contents System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fontSize System.Double = 10
- textColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- borderColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- borderWidth System.Double = 1
- fillColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- textAlign OfficeIMO.Pdf.PdfAlign = Left
- padding System.Double = 3
- lineHeight System.Nullable{System.Double} = null
public PdfPageCanvas HighlightAnnotation(String contents, Double x, Double y, Double width, Double height, Nullable<PdfColor> color = null) #PdfPageCanvasAdds a PDF highlight annotation rectangle at fixed top-left page coordinates.
Parameters
- contents System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
public PdfPageCanvas Image(Byte[] imageBytes, Double x, Double y, Double width, Double height, PdfImageStyle style = null, String linkUri = null, String linkContents = null, String alternativeText = null, Double rotationAngle = 0, Boolean horizontalFlip = false, Boolean verticalFlip = false) #PdfPageCanvasAdds a supported image at fixed top-left page coordinates.
Parameters
- imageBytes System.Byte[]
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfImageStyle = null
- linkUri System.String = null
- linkContents System.String = null
- alternativeText System.String = null
- rotationAngle System.Double = 0
- horizontalFlip System.Boolean = false
- verticalFlip System.Boolean = false
public PdfPageCanvas Outline(String title, Int32 level, Double y) #PdfPageCanvasAdds a document outline entry targeting an absolute top-left page coordinate.
Parameters
- title System.String
- Visible outline title.
- level System.Int32
- One-based outline hierarchy level.
- y System.Double
- Top coordinate in page points.
public PdfPageCanvas Shape(OfficeShape shape, Double x, Double y, PdfDrawingStyle style = null, String linkUri = null, String linkContents = null, Double rotationAngle = 0) #PdfPageCanvasAdds a shared drawing shape at fixed top-left page coordinates.
Parameters
- shape OfficeIMO.Drawing.OfficeShape
- x System.Double
- y System.Double
- style OfficeIMO.Pdf.PdfDrawingStyle = null
- linkUri System.String = null
- linkContents System.String = null
- rotationAngle System.Double = 0
public PdfPageCanvas Structure(PdfCanvasStructureRole role, Action<PdfPageCanvas> build, PdfCanvasStructureOptions options = null) #PdfPageCanvasGroups absolute canvas content under a typed tagged-PDF structure container.
Parameters
- role OfficeIMO.Pdf.PdfCanvasStructureRole
- build System.Action{OfficeIMO.Pdf.PdfPageCanvas}
- options OfficeIMO.Pdf.PdfCanvasStructureOptions = null
public PdfPageCanvas Table(IEnumerable<String[]> rows, Double x, Double y, Double width, Double height, PdfTableStyle style = null, Double rotationAngle = 0) #PdfPageCanvasAdds a fixed-position table inside a page rectangle using top-left page coordinates.
Parameters
- rows System.Collections.Generic.IEnumerable{System.String[]}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfTableStyle = null
- rotationAngle System.Double = 0
public PdfPageCanvas Table(IEnumerable<String[]> rows, Double x, Double y, Double width, Double height, PdfTableStyle style, Action<PdfLayoutDiagnostic> diagnosticHandler) #PdfPageCanvasAdds a fixed-position table inside a page rectangle using top-left page coordinates and reports layout diagnostics during rendering.
Parameters
- rows System.Collections.Generic.IEnumerable{System.String[]}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfTableStyle
- diagnosticHandler System.Action{OfficeIMO.Pdf.PdfLayoutDiagnostic}
public PdfPageCanvas Table(IEnumerable<String[]> rows, Double x, Double y, Double width, Double height, PdfTableStyle style, Double rotationAngle, Action<PdfLayoutDiagnostic> diagnosticHandler) #PdfPageCanvasAdds a fixed-position table inside a page rectangle using top-left page coordinates and reports layout diagnostics during rendering.
Parameters
- rows System.Collections.Generic.IEnumerable{System.String[]}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfTableStyle
- rotationAngle System.Double
- diagnosticHandler System.Action{OfficeIMO.Pdf.PdfLayoutDiagnostic}
public PdfPageCanvas Table(IEnumerable<PdfTableCell[]> rows, Double x, Double y, Double width, Double height, PdfTableStyle style = null, Double rotationAngle = 0) #PdfPageCanvasAdds a fixed-position rich table inside a page rectangle using top-left page coordinates.
Parameters
- rows System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfTableCell[]}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfTableStyle = null
- rotationAngle System.Double = 0
public PdfPageCanvas Table(IEnumerable<PdfTableCell[]> rows, Double x, Double y, Double width, Double height, PdfTableStyle style, Action<PdfLayoutDiagnostic> diagnosticHandler) #PdfPageCanvasAdds a fixed-position rich table inside a page rectangle using top-left page coordinates and reports layout diagnostics during rendering.
Parameters
- rows System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfTableCell[]}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfTableStyle
- diagnosticHandler System.Action{OfficeIMO.Pdf.PdfLayoutDiagnostic}
public PdfPageCanvas Table(IEnumerable<PdfTableCell[]> rows, Double x, Double y, Double width, Double height, PdfTableStyle style, Double rotationAngle, Action<PdfLayoutDiagnostic> diagnosticHandler) #PdfPageCanvasAdds a fixed-position rich table inside a page rectangle using top-left page coordinates and reports layout diagnostics during rendering.
Parameters
- rows System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.PdfTableCell[]}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfTableStyle
- rotationAngle System.Double
- diagnosticHandler System.Action{OfficeIMO.Pdf.PdfLayoutDiagnostic}
public PdfPageCanvas Text(String text, Double x, Double y, Double width, Double height, Nullable<Double> fontSize = null, Nullable<PdfColor> color = null, PdfAlign align = Left, Nullable<PdfStandardFont> font = null) #PdfPageCanvasAdds text inside a fixed page rectangle using top-left page coordinates.
Parameters
- text System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fontSize System.Nullable{System.Double} = null
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- align OfficeIMO.Pdf.PdfAlign = Left
- font System.Nullable{OfficeIMO.Pdf.PdfStandardFont} = null
public PdfPageCanvas Text(IEnumerable<TextRun> runs, Double x, Double y, Double width, Double height, Nullable<PdfColor> defaultColor = null, PdfAlign align = Left, Nullable<Double> fontSize = null, Nullable<Double> lineHeight = null) #PdfPageCanvasAdds rich text runs inside a fixed page rectangle using top-left page coordinates.
Parameters
- runs System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.TextRun}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- defaultColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- align OfficeIMO.Pdf.PdfAlign = Left
- fontSize System.Nullable{System.Double} = null
- lineHeight System.Nullable{System.Double} = null
public PdfPageCanvas Text(IEnumerable<TextRun> runs, PdfCanvasTextStructureRole structureRole, Double x, Double y, Double width, Double height, Nullable<PdfColor> defaultColor = null, PdfAlign align = Left, Nullable<Double> fontSize = null, Nullable<Double> lineHeight = null) #PdfPageCanvasAdds tagged rich text runs inside a fixed page rectangle using top-left page coordinates.
Parameters
- runs System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.TextRun}
- structureRole OfficeIMO.Pdf.PdfCanvasTextStructureRole
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- defaultColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- align OfficeIMO.Pdf.PdfAlign = Left
- fontSize System.Nullable{System.Double} = null
- lineHeight System.Nullable{System.Double} = null
public PdfPageCanvas TextAnnotation(String contents, Double x, Double y, Double width = 18, Double height = 18, PdfTextAnnotationIcon icon = Comment, Nullable<PdfColor> color = null, Boolean open = false) #PdfPageCanvasAdds a PDF text annotation at fixed top-left page coordinates.
Parameters
- contents System.String
- x System.Double
- y System.Double
- width System.Double = 18
- height System.Double = 18
- icon OfficeIMO.Pdf.PdfTextAnnotationIcon = Comment
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- open System.Boolean = false
public PdfPageCanvas TextBox(String text, Double x, Double y, Double width, Double height, PdfCanvasTextBoxStyle style = null, Double rotationAngle = 0) #PdfPageCanvasAdds a styled fixed-position text box using top-left page coordinates.
Parameters
- text System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfCanvasTextBoxStyle = null
- rotationAngle System.Double = 0
public PdfPageCanvas TextBox(String text, Double x, Double y, Double width, Double height, PdfCanvasTextBoxStyle style, Action<PdfLayoutDiagnostic> diagnosticHandler) #PdfPageCanvasAdds a styled fixed-position text box using top-left page coordinates and reports layout diagnostics during rendering.
Parameters
- text System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfCanvasTextBoxStyle
- diagnosticHandler System.Action{OfficeIMO.Pdf.PdfLayoutDiagnostic}
public PdfPageCanvas TextBox(String text, Double x, Double y, Double width, Double height, PdfCanvasTextBoxStyle style, Double rotationAngle, Action<PdfLayoutDiagnostic> diagnosticHandler) #PdfPageCanvasAdds a styled fixed-position text box using top-left page coordinates and reports layout diagnostics during rendering.
Parameters
- text System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfCanvasTextBoxStyle
- rotationAngle System.Double
- diagnosticHandler System.Action{OfficeIMO.Pdf.PdfLayoutDiagnostic}
public PdfPageCanvas TextBox(IEnumerable<TextRun> runs, Double x, Double y, Double width, Double height, PdfCanvasTextBoxStyle style = null, Double rotationAngle = 0) #PdfPageCanvasAdds styled rich text inside a fixed-position text box using top-left page coordinates.
Parameters
- runs System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.TextRun}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfCanvasTextBoxStyle = null
- rotationAngle System.Double = 0
public PdfPageCanvas TextBox(IEnumerable<TextRun> runs, Double x, Double y, Double width, Double height, PdfCanvasTextBoxStyle style, Action<PdfLayoutDiagnostic> diagnosticHandler) #PdfPageCanvasAdds styled rich text inside a fixed-position text box using top-left page coordinates and reports layout diagnostics during rendering.
Parameters
- runs System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.TextRun}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfCanvasTextBoxStyle
- diagnosticHandler System.Action{OfficeIMO.Pdf.PdfLayoutDiagnostic}
public PdfPageCanvas TextBox(IEnumerable<TextRun> runs, Double x, Double y, Double width, Double height, PdfCanvasTextBoxStyle style, Double rotationAngle, Action<PdfLayoutDiagnostic> diagnosticHandler) #PdfPageCanvasAdds styled rich text inside a fixed-position text box using top-left page coordinates and reports layout diagnostics during rendering.
Parameters
- runs System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.TextRun}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- style OfficeIMO.Pdf.PdfCanvasTextBoxStyle
- rotationAngle System.Double
- diagnosticHandler System.Action{OfficeIMO.Pdf.PdfLayoutDiagnostic}