Namespace SoftZenPdf

Classes

ContentStreamWriter

Draws on a page by writing PDF content-stream operators. Obtain it from Content; every method returns the writer so calls can be chained.

ImagePageOptions

Options for AddImagePage(PdfImage, ImagePageOptions?) and FromImages(IEnumerable<string>, ImagePageOptions?).

LicenseInfo

What a license key licenses. Returned by SetKey(string) and Current.

PageSize

A page size in points (1/72 inch). Use a predefined size or create one from points, millimetres or inches.

PdfAException

Thrown when saving a PDF/A document whose validation finds violations. See ValidateOnSave.

PdfAValidationResult

The outcome of a PDF/A-2b check by ValidatePdfA2b() or ValidatePdfA2b().

PdfAViolation

A PDF/A rule broken by a document.

PdfAcroForm

The interactive form of a document being built, reached through Form. Fields are added with the PdfPage.Add… methods; to fill an existing PDF form, use PdfFormFiller.

PdfButtonAction

What a PdfPushButton does when clicked. These are standard PDF actions (ISO 32000-1 §12.6.4) and need no JavaScript.

PdfCheckBox

A check box. Created with AddCheckBox(string, double, double, double, bool).

PdfComboBox

A dropdown list (combo box). Created with AddDropdown(string, double, double, double, double, IEnumerable<string>, string?).

PdfDocument

A PDF document under construction: add pages, draw on them, set metadata, bookmarks, forms, watermarks or encryption, then Save(string) it. Existing PDFs are read with PdfReader and can be recombined with Merge(params PdfReader[]), Extract(PdfReader, IEnumerable<int>) and ImportPages(PdfReader).

PdfDocumentInfo

Document metadata. When a document is saved it is written to the Info dictionary and, unless WriteXmpMetadata is turned off, mirrored in an XMP metadata stream. Properties left null are omitted.

PdfFont

A font that text can be drawn with: a StandardFont or an embedded TrueTypeFont.

PdfFormField

Base class of the interactive form fields created with the PdfPage.Add… methods. Every field gets real appearance streams, so it looks the same in every viewer, including ones that do not regenerate appearances.

PdfFormFieldInfo

A form field read from a document by ReadFormFields() or Fields.

PdfFormFiller

Fills the interactive form of an existing PDF. Changes are appended as an incremental update, so the original bytes are kept unchanged, and new appearance streams are generated so filled values show in every viewer.

PdfImage

An image that can be drawn on pages with DrawImage(PdfImage, double, double, double, double), placed on a page of its own with AddImagePage(PdfImage, ImagePageOptions?), or used as a Watermark. Each image is embedded once per document, however many times it is drawn.

PdfLicense

Activates a SoftZenPdf license. Without a license key the library runs in evaluation mode: everything works, but every page it saves carries a small "evaluation copy" mark at the top.

PdfLicenseException

A license key was rejected by SetKey(string). The message says why.

PdfLinkInfo

A link annotation read from a page by GetLinks(int).

PdfListBox

A scrollable list of choices, of which one or, with MultiSelect, several can be selected. Created with AddListBox(string, double, double, double, double, IEnumerable<string>, string?).

PdfOutline

The document outline: the tree of bookmarks shown in a viewer's navigation pane. Access it through Outline. When it has entries, viewers open with the bookmarks pane visible.

PdfOutlineEntry

A bookmark read from an existing document by ReadOutline().

PdfOutlineItem

A bookmark in the document outline, possibly with child bookmarks.

PdfPage

A page of a PdfDocument. Draw on it through Content, add links and form fields, or rotate it. Pages are created with AddPage(PageSize?, PageOrientation?) or ImportPages(PdfReader).

PdfPasswordException

Thrown when an encrypted PDF is opened without the correct password.

PdfPushButton

A push button: a clickable caption that performs a PdfButtonAction, such as opening a web page, resetting the form or submitting it. It has no value. Created with AddPushButton(string, double, double, double, double, string).

PdfRadioGroup

A group of radio buttons, of which at most one is selected. Created with AddRadioGroup(string, double, params (string Value, double X, double Y)[]) or AddRadioGroup(string).

PdfReader

Reads an existing PDF file: pages, metadata, bookmarks, links, form fields and text. A reader is also the source for Merge(params PdfReader[]), Extract(PdfReader, IEnumerable<int>) and ImportPages(PdfReader).

PdfSignatureField

An empty signature field: a placeholder that a signing application can fill. SoftZenPdf does not create digital signatures. Created with AddSignatureField(string, double, double, double, double).

PdfTextField

A text field, single-line or multi-line. Created with AddTextField(string, double, double, double, double, string).

PdfTextRun

A piece of text shown by a single text-showing operator, with its position on the page.

StandardFont

One of the 14 standard PDF fonts, which every viewer provides, so nothing is embedded and files stay small.

TextExtractionOptions

Options for ExtractText(int, TextExtractionOptions?) and ExtractTextWithPositions(int, TextExtractionOptions?).

TrueTypeFont

A TrueType font embedded in the document. Only the glyphs actually used are embedded (subsetting), and a ToUnicode map is added so text can be copied and searched. Use it for any text beyond Western European characters.

Watermark

Text or an image drawn semi-transparently over the centre of every page when the document is saved. Assign it to Watermark.

Structs

PdfColor

An RGB colour with components from 0 to 1, written to PDF as DeviceRGB.

Enums

ImageFit

How an image is scaled into the area of an image page (see Fit).

LicenseType

The kinds of SoftZenPdf license.

PageOrientation

Page orientation.

PdfAConformance

PDF/A conformance levels supported by CreateForPdfA(PdfAConformance).

PdfEncryptionAlgorithm

Encryption algorithms of the Standard Security Handler.

PdfFieldKind

The type of an interactive form field read from a document.

PdfImageFormat

The file format an image was loaded from.

PdfPermissions

What a user who opens an encrypted document with the user password may do. Combine flags with |, or start from All and remove flags with & ~.

PdfSubmitFormat

The format in which SubmitForm(Uri, PdfSubmitFormat) sends field values.

TextAlignment

Horizontal alignment of text in a text field or dropdown.

TextDirection

The base direction of a line of text, used by the Unicode Bidirectional Algorithm to order mixed left-to-right and right-to-left text. Set it with TextDirection.

TextOrder

The order in which extracted text runs are returned.

TextRenderingMode

How text glyphs are painted; see SetTextRenderingMode(TextRenderingMode).