API Reference

Class

PdfCiiInvoiceDocument

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
Modifiers sealed

An immutable CII namespace-100 XML document with bounded header editing. Loading does not establish schema, business-rule, tax, or profile compliance.

Inheritance

  • Object
  • PdfCiiInvoiceDocument

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Methods

Load 3 overloads
public static PdfCiiInvoiceDocument Load(Byte[] xml) #
Returns: PdfCiiInvoiceDocument

Loads a defensive copy of CII XML. DTDs, external entities, excessive depth, and oversized input are rejected. Unknown elements and attributes are retained. Namespace prefixes may vary; the root namespace must be version 100.

Parameters

xml System.Byte[] requiredposition: 0

Exceptions

  • InvalidDataException – The size, depth, or root is unsupported.
  • XmlException – The input is not well-formed XML or includes a DTD.
public static PdfCiiInvoiceDocument Load(String path) #
Returns: PdfCiiInvoiceDocument

Loads existing CII invoice XML from a file, applying the same limits as byte-array loading.

Parameters

path System.String requiredposition: 0
public static PdfCiiInvoiceDocument Load(Stream stream) #
Returns: PdfCiiInvoiceDocument

Loads existing CII invoice XML from the stream's current position to its end. Reads at most the size limit plus one byte and leaves the caller's stream open.

Parameters

stream System.IO.Stream requiredposition: 0
Save 2 overloads
public Void Save(Stream stream) #
Returns: Void

Writes the stored XML bytes at the current position and leaves the caller's stream open.

Parameters

stream System.IO.Stream requiredposition: 0
public Void Save(String path) #
Returns: Void

Saves the stored XML bytes to a file, replacing any existing contents.

Parameters

path System.String requiredposition: 0
public Byte[] ToBytes() #
Returns: Byte[]

Returns a copy of the stored XML bytes. An unedited document is byte-identical to its input. Edited documents use UTF-8 and retain XML content, but not original lexical formatting or byte identity.

public PdfCiiInvoiceDocument WithDocumentId(String documentId) #
Returns: PdfCiiInvoiceDocument

Creates an edited document by replacing one existing, unambiguous invoice identifier. Other fields, including payment references and visible PDF content, are not updated. Signed XML and structured or missing identifier fields are rejected without changing the original.

Parameters

documentId System.String requiredposition: 0
public PdfCiiInvoiceDocument WithIssueDate(DateTime issueDate) #
Returns: PdfCiiInvoiceDocument

Creates an edited document by replacing one existing format-102 issue date. Time and time zone are ignored; delivery and payment dates are retained. Signed XML, ambiguous fields, and other date representations are rejected.

Parameters

issueDate System.DateTime requiredposition: 0

Properties

public String DocumentId { get; } #

Invoice identifier from the direct exchanged-document header, if present.

public String TypeCode { get; } #

Declared document type code, without interpreting its profile validity.

public String GuidelineId { get; } #

Declared guideline identifier, without claiming that its requirements are satisfied.

public String CurrencyCode { get; } #

Declared invoice currency, without validating code lists or monetary amounts.

public Nullable<DateTime> IssueDate { get; } #

Issue date for a valid format-102 calendar date; null for missing or other date representations.

public Boolean HasXmlSignature { get; } #

Whether an XML Signature element is present. Signatures are not verified by this model.

Fields

public const Int32 MaximumXmlBytes #

Maximum accepted XML byte length, including any byte order mark.

Value: 16777216