# PdfInvoiceDocument

Captures a typed invoice once for visible PDF content and its embedded CII attachment.

Class 

`OfficeIMO.Invoicing.Pdf`

**Namespace**

`OfficeIMO.Invoicing.Pdf`

**Assembly**

`OfficeIMO.Invoicing.Pdf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[PdfInvoiceDocument.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L36)

**Modifiers**

sealed

Captures a typed invoice once for visible PDF content and its embedded CII attachment.

## Inheritance

- object
- PdfInvoiceDocument

## Usage

Explore 1 API references to this type

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

### Returned or exposed by 1

- Method [PdfInvoiceDocument.Create](/api/invoicing-pdf/officeimo-invoicing-pdf-pdfinvoicedocument/#method-create-officeimo-invoicing-invoice-officeimo-invoicing-invoicexmloptions-officeimo-invoicing-pdf-invoicepdflayoutoptions)

Filter members 

Show inherited

## Methods

`public static PdfInvoiceDocument Create(Invoice invoice, InvoiceXmlOptions contract, InvoicePdfLayoutOptions? layout = null)` [#](#method-create-officeimo-invoicing-invoice-officeimo-invoicing-invoicexmloptions-officeimo-invoicing-pdf-invoicepdflayoutoptions)

[PdfInvoiceDocument.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L36)

Creates an independent snapshot for a document type in InvoiceDocumentTypes. Later edits to the supplied invoice cannot change its PDF or XML.

Parameters

**invoice OfficeIMO.Invoicing.Invoice required**

**contract OfficeIMO.Invoicing.InvoiceXmlOptions required**

**layout OfficeIMO.Invoicing.Pdf.InvoicePdfLayoutOptions? = null optional**

Returns

`PdfInvoiceDocument`

`public Invoice ToInvoice()` [#](#method-toinvoice)

[PdfInvoiceDocument.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L53)

Returns an independent editable model. After edits, call [PdfInvoiceDocument.Create](/api/invoicing-pdf/officeimo-invoicing-pdf-pdfinvoicedocument/) with an explicit contract preserving this snapshot's release and profile.

Returns

`Invoice`

ToPdfBytes 2 overloads

`public byte[] ToPdfBytes(PdfCreateOptions? options = null)` [#](#method-topdfbytes-officeimo-pdf-pdfcreateoptions)

[PdfInvoiceDocument.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L62)

Renders the captured invoice and attaches its exact CII XML using Factur-X PDF/A-3 groundwork. Supported hybrid profiles are PDF/A-3a, PDF/A-3b and PDF/A-3u, optionally with PDF/UA-1. A PDF/A-3 compliance profile without identification metadata configures that requested conformance level. A PDF/UA-1 compliance profile without identification metadata configures PDF/UA-1 alongside the invoice carrier. Supply embedded fonts through the PDF options. Validate the exact output with PDF/A and invoice validators before claiming compliance.

Parameters

**options OfficeIMO.Pdf.PdfCreateOptions? = null optional**

Returns

`byte[]`

`public byte[] ToPdfBytes(PdfCreateOptions? options, CancellationToken cancellationToken)` [#](#method-topdfbytes-officeimo-pdf-pdfcreateoptions-threading-cancellationtoken)

[PdfInvoiceDocument.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L66)

Renders the captured hybrid invoice with cancellation support.

Parameters

**options OfficeIMO.Pdf.PdfCreateOptions? required**

**cancellationToken System.Threading.CancellationToken required**

Returns

`byte[]`

ToPresentationPdfBytes 2 overloads

`public byte[] ToPresentationPdfBytes(PdfCreateOptions? options = null)` [#](#method-topresentationpdfbytes-officeimo-pdf-pdfcreateoptions)

[PdfInvoiceDocument.cs:73](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L73)

Renders the captured invoice as a presentation-only PDF without attaching CII XML. Use [PdfInvoiceDocument.ToPdfBytes](/api/invoicing-pdf/officeimo-invoicing-pdf-pdfinvoicedocument/) when a Factur-X/ZUGFeRD hybrid document is required.

Parameters

**options OfficeIMO.Pdf.PdfCreateOptions? = null optional**

Returns

`byte[]`

`public byte[] ToPresentationPdfBytes(PdfCreateOptions? options, CancellationToken cancellationToken)` [#](#method-topresentationpdfbytes-officeimo-pdf-pdfcreateoptions-threading-cancellationtoken)

[PdfInvoiceDocument.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L77)

Renders the presentation-only invoice with cancellation support.

Parameters

**options OfficeIMO.Pdf.PdfCreateOptions? required**

**cancellationToken System.Threading.CancellationToken required**

Returns

`byte[]`

`public byte[] ToXmlBytes()` [#](#method-toxmlbytes)

[PdfInvoiceDocument.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L51)

Returns a defensive copy of the exact CII bytes embedded in generated PDFs.

Returns

`byte[]`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Number { get; }` [#](#property-number)

[PdfInvoiceDocument.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L43)

Captured invoice number.

`public InvoiceProfile Profile { get; }` [#](#property-profile)

[PdfInvoiceDocument.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L45)

Captured CII authoring profile. Pass this value to [PdfInvoiceDocument.Create](/api/invoicing-pdf/officeimo-invoicing-pdf-pdfinvoicedocument/) when recapturing an edited model.

`public InvoiceSpecificationRelease Release { get; }` [#](#property-release)

[PdfInvoiceDocument.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L47)

Captured specification release. Preserve it when recapturing an edited model.

`public decimal PayableAmount { get; }` [#](#property-payableamount)

[PdfInvoiceDocument.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.Pdf/PdfInvoiceDocument.cs#L49)

Captured amount due in the document currency.

<!-- PowerForge markdown artifact sha256:4D8EB2022474FED7F9CCB421A6EF01DA17E2414ABB1F702F05C3525B9FA20F36 -->
