Table of Contents

Class PdfADocument

Namespace
iText.Pdfa
Assembly
itext.pdfa.dll

This class extends PdfDocument and is in charge of creating files that comply with the PDF/A standard.

public class PdfADocument : PdfDocument, IEventDispatcher, IDisposable
Inheritance
PdfADocument
Implements
Derived
Inherited Members

Remarks

This class extends PdfDocument and is in charge of creating files that comply with the PDF/A standard. Client code is still responsible for making sure the file is actually PDF/A compliant: multiple steps must be undertaken (depending on the PdfAConformanceLevel ) to ensure that the PDF/A standard is followed. This class will throw exceptions, mostly PdfAConformanceException , and thus refuse to output a PDF/A file if at any point the document does not adhere to the PDF/A guidelines specified by the PdfAConformanceLevel.

Constructors

PdfADocument(PdfReader, PdfWriter)

Opens a PDF/A document in the stamping mode.

public PdfADocument(PdfReader reader, PdfWriter writer)

Parameters

reader PdfReader

PDF reader.

writer PdfWriter

PDF writer.

PdfADocument(PdfReader, PdfWriter, StampingProperties)

Opens a PDF/A document in stamping mode.

public PdfADocument(PdfReader reader, PdfWriter writer, StampingProperties properties)

Parameters

reader PdfReader

PDF reader.

writer PdfWriter

PDF writer.

properties StampingProperties

properties of the stamping process

PdfADocument(PdfWriter, PdfAConformanceLevel, PdfOutputIntent)

Constructs a new PdfADocument for writing purposes, i.e. from scratch.

public PdfADocument(PdfWriter writer, PdfAConformanceLevel conformanceLevel, PdfOutputIntent outputIntent)

Parameters

writer PdfWriter

the PdfWriter object to write to

conformanceLevel PdfAConformanceLevel

the generation and strictness level of the PDF/A that must be followed.

outputIntent PdfOutputIntent

a PdfOutputIntent

Remarks

Constructs a new PdfADocument for writing purposes, i.e. from scratch. A PDF/A file has a conformance level, and must have an explicit output intent.

PdfADocument(PdfWriter, PdfAConformanceLevel, PdfOutputIntent, DocumentProperties)

Constructs a new PdfADocument for writing purposes, i.e. from scratch.

public PdfADocument(PdfWriter writer, PdfAConformanceLevel conformanceLevel, PdfOutputIntent outputIntent, DocumentProperties properties)

Parameters

writer PdfWriter

the PdfWriter object to write to

conformanceLevel PdfAConformanceLevel

the generation and strictness level of the PDF/A that must be followed.

outputIntent PdfOutputIntent

a PdfOutputIntent

properties DocumentProperties

a DocumentProperties

Remarks

Constructs a new PdfADocument for writing purposes, i.e. from scratch. A PDF/A file has a conformance level, and must have an explicit output intent.

Fields

checker

protected PdfAChecker checker

Field Value

PdfAChecker

Methods

AddCustomMetadataExtensions(XMPMeta)

protected override void AddCustomMetadataExtensions(XMPMeta xmpMeta)

Parameters

xmpMeta XMPMeta

AddOutputIntent(PdfOutputIntent)

public override void AddOutputIntent(PdfOutputIntent outputIntent)

Parameters

outputIntent PdfOutputIntent

CheckIsoConformance()

Checks whether PDF document conforms to a specific standard.

protected override void CheckIsoConformance()

CheckIsoConformance(object, IsoKey, PdfResources, PdfStream, object)

public override void CheckIsoConformance(object obj, IsoKey key, PdfResources resources, PdfStream contentStream, object extra)

Parameters

obj object

an object to conform.

key IsoKey

type of object to conform.

resources PdfResources

PdfResources associated with an object to check.

contentStream PdfStream

current content stream.

extra object

extra data required for the check.

FlushInfoDictionary(bool)

protected override void FlushInfoDictionary(bool appendMode)

Parameters

appendMode bool

FlushObject(PdfObject, bool)

protected override void FlushObject(PdfObject pdfObject, bool canBeInObjStm)

Parameters

pdfObject PdfObject
canBeInObjStm bool

GetConformanceLevel()

public override IConformanceLevel GetConformanceLevel()

Returns

IConformanceLevel

GetDefaultFont()

No default font for PDF/A documents.

public override PdfFont GetDefaultFont()

Returns

PdfFont

null.

GetPageFactory()

protected override IPdfPageFactory GetPageFactory()

Returns

IPdfPageFactory

InitTagStructureContext()

Initializes tagStructureContext to track necessary information of document's tag structure.

protected override void InitTagStructureContext()

SetChecker(PdfAConformanceLevel)

Sets the checker that defines the requirements of the PDF/A standard depending on conformance level.

protected virtual void SetChecker(PdfAConformanceLevel conformanceLevel)

Parameters

conformanceLevel PdfAConformanceLevel

PdfAConformanceLevel

SetChecker(PdfAChecker)

protected virtual void SetChecker(PdfAChecker checker)

Parameters

checker PdfAChecker

UpdateXmpMetadata()

protected override void UpdateXmpMetadata()