Click or drag to resize
Pdftools logo

DocumentCreateWithFdf Method

Create a new PDF document and an associated FDF.

Documents with created with this method are writable and can be modified. When creating a document with this method, all MarkupAnnotations - created or copied - are stored as an FDF file to the fdfStream. In the output PDF (pdfStream), only annotations that are not MarkupAnnotations are stored.

Namespace: PdfTools.Toolbox.Pdf
Assembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.0.0+fdabb036503e9f99735634a6d4f5be875399e9f5
Syntax
C#
public static Document CreateWithFdf(
	Stream pdfStream,
	Stream fdfStream,
	Conformance? conformance,
	Encryption encryption
)

Parameters

pdfStream  Stream

The stream where the PDF document is stored.

Both, read and write access is required. The resulting PDF document contains no MarkupAnnotations.

fdfStream  Stream

The stream where the document's MarkupAnnotations are stored in the FDF format.

Both, read and write access is required.

conformance  NullableConformance

The required conformance level of the PDF document. Adding pages or content from incompatible documents or using incompatible features will lead to a conformance error.

When using , the conformance is determined automatically, based on the conformance of the input documents and the requirements of the used features.

Note that for PDF/A document it is highly recommended to set an output intent using OutputIntent.

encryption  Encryption
the optional encryption parameters

Return Value

Document
the newly created document instance
Exceptions
ExceptionCondition
IOExceptionError writing to the pdfStream
ConformanceExceptionIf the conformance level is lower than 1.7 and Unicode passwords are specified. In this context "a Unicode password" is essentially one containing characters that are not in the Windows ANSI encoding (Windows Code Page 1252).
ArgumentNullExceptionif pdfStream is .
ArgumentNullExceptionif fdfStream is .
See Also