Class PdfADocument
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
PdfADocument(PdfReader, PdfWriter, StampingProperties)
Opens a PDF/A document in stamping mode.
public PdfADocument(PdfReader reader, PdfWriter writer, StampingProperties properties)
Parameters
reader
PdfReaderPDF reader.
writer
PdfWriterPDF writer.
properties
StampingPropertiesproperties 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
PdfWriterthe PdfWriter object to write to
conformanceLevel
PdfAConformanceLevelthe generation and strictness level of the PDF/A that must be followed.
outputIntent
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
PdfWriterthe PdfWriter object to write to
conformanceLevel
PdfAConformanceLevelthe generation and strictness level of the PDF/A that must be followed.
outputIntent
PdfOutputIntentproperties
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
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
objectan object to conform.
key
IsoKeytype of object to conform.
resources
PdfResourcesPdfResources associated with an object to check.
contentStream
PdfStreamcurrent content stream.
extra
objectextra 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
GetConformanceLevel()
public override IConformanceLevel GetConformanceLevel()
Returns
GetDefaultFont()
No default font for PDF/A documents.
public override PdfFont GetDefaultFont()
Returns
GetPageFactory()
protected override IPdfPageFactory GetPageFactory()
Returns
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
SetChecker(PdfAChecker)
protected virtual void SetChecker(PdfAChecker checker)
Parameters
checker
PdfAChecker
UpdateXmpMetadata()
protected override void UpdateXmpMetadata()