PdfTagger Class

Adds tags to a PDF document that has none. The headings, the paragraphs, the lists, the tables, the images, the links and the form fields of the pages are found and written as the structure of the document in reading order, while page headers, page footers and decorations are marked as artifacts. The pages look the same after tagging

Definition

Namespace: EvoPdf.Next
Assembly: EvoPdf.Next (in EvoPdf.Next.dll) Version: 15.1.0
C#
public class PdfTagger : IDisposable
Inheritance
Object    PdfTagger
Implements
IDisposable

Constructors

PdfTagger(Byte, String) Loads the PDF document to tag from a memory buffer
PdfTagger(String, String) Loads the PDF document to tag from a file

Properties

AddBookmarks When true, a document without bookmarks receives a bookmark for each heading found in its pages. The default is true
DrawingsAsFigures When true, the drawings made of lines and curves, such as charts and diagrams, are tagged as figures, with the alternative text of the images. By default they are marked as artifacts and the text inside them is tagged as text. The default is false
FirstTableRowIsHeader When true, the cells of the first row of each table are tagged as header cells. The default is true
ImageAlternativeText The alternative text given to the images. The default is "Image"
ImageAlternativeTextProvider A function that gives the alternative text of each tagged image. When it returns null or an empty text the image receives ImageAlternativeText
ImagesAsArtifacts When true, the images are marked as artifacts and are not a part of the document structure. The default is false
IsTagged True when the loaded document is already a tagged PDF
KeepStandardFonts When true, the fonts the document uses without embedding them are left as they are. By default, when a PDF standard is set, the standard fonts are replaced by embedded fonts, with the text kept at the same positions, and the other fonts are embedded when they are installed on the system. The fonts that replace the standard fonts can be set with SetStandardFontSubstitute(PdfStandardFont, PdfBaseFont)
Language The language of the text, as a language code such as en-US, for a document that does not declare its language. By default the language is found from the text of the document, and en-US is used when it cannot be found
PageCount The number of pages of the loaded document
PdfStandard The PDF standard the tagged document is written for: PdfUa1, which is the default, PdfUa2, or None for a tagged PDF without a standard identification. It is set before AutoTag
ReplaceExistingTags When true, the tags of a document that is already a tagged PDF are replaced. By default such a document is left as it is
Result What the tagging added to the document. It is available after AutoTag
RunTimeoutSec The maximum time in seconds allowed for the analysis of the document pages. The default is 120
Title The title for a document that has no title. By default the first heading of the document is used

Methods

AutoTag Finds the structure of the document and tags its content. A document that is already a tagged PDF is left as it is unless ReplaceExistingTags is set
AutoTagAsync Finds the structure of the document and tags its content. A document that is already a tagged PDF is left as it is unless ReplaceExistingTags is set
Dispose Releases the loaded document
Dispose(Boolean) Releases the loaded document
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
Save Saves the tagged document to a byte array. The tagger cannot be used after the document is saved
SaveAsync Saves the tagged document to a byte array. The tagger cannot be used after the document is saved
SaveToFile Saves the tagged document to a file. The tagger cannot be used after the document is saved
SaveToFileAsync Saves the tagged document to a file. The tagger cannot be used after the document is saved
ToString
(Inherited from Object)

See Also