PeachDrawing.PDF.PdfTagRecorder
PdfTagRecorder.OpenContentElement Method
| Overloads | |
|---|---|
| OpenContentElement(Canvas, object, string, string) | Opens a content structure element for key: creates it the first time the key is seen, allocates a marked-content id, and marks everything drawn on canvas until the returned scope is disposed as that element’s content. Content that spans a page break is recorded on each page it lands on. A content element is a leaf: it does not become the parent of elements opened inside it. |
| OpenContentElement(Canvas, object, string, string, PdfStructureDetails) | Opens a content element as OpenContentElement(Canvas, object, string, string) does, giving it a language, a title or attributes the first time it is opened. |
PdfTagRecorder.OpenContentElement(Canvas, object, string, string) Method
Opens a content structure element for key: creates it the first time the key is seen, allocates a marked-content id, and marks everything drawn on canvas until the returned scope is disposed as that element’s content. Content that spans a page break is recorded on each page it lands on. A content element is a leaf: it does not become the parent of elements opened inside it.
public System.IDisposable OpenContentElement(PeachDrawing.Core.Canvas canvas, object key, string structureType, string? altText=null);
Parameters
canvas Canvas
the canvas the content is drawn on
key System.Object
identifies the element; the same key opens the same element again
structureType System.String
the structure type, such as P, H1, Span or Figure (without the slash)
altText System.String
the alternative text of a figure or formula, or null. A Figure with none still gets an empty
alternative text when the recorder was created to require it (the accessible PDF/A levels), which marks it decorative.
Returns
System.IDisposable
a scope that ends the marked content when disposed
PdfTagRecorder.OpenContentElement(Canvas, object, string, string, PdfStructureDetails) Method
Opens a content element as OpenContentElement(Canvas, object, string, string) does, giving it a language, a title or attributes the first time it is opened.
public System.IDisposable OpenContentElement(PeachDrawing.Core.Canvas canvas, object key, string structureType, string? altText, PeachDrawing.PDF.PdfStructureDetails? details);
Parameters
canvas Canvas
the canvas the content is drawn on
key System.Object
identifies the element; the same key opens the same element again
structureType System.String
the structure type, without the slash
altText System.String
the alternative text of a figure or formula, or null
details PdfStructureDetails
what else to give the element, or null
Returns
System.IDisposable
a scope that ends the marked content when disposed