API reference

The public surface area of JetsonPDF, grouped by namespace. For full member-level docs — constructor signatures, properties, XML doc-comments — see the source.

Reference PDFs. Every namespace below ships with a generated, paginated reference doc — built by JetsonPDF itself from the public surface:

Namespace JetsonPDF JetsonPDF.Writer.dll

The core writer API: documents, pages, fonts, images, colour, paths, and document-level features.

TypePurpose
DocumentTop-level document. Configure metadata, encryption, conformance flags, then call AddPage and Save() / Save(path | Stream) (the no-arg overload returns a byte[]). Open an existing PDF for editing via Document.Open(string | byte[] | Stream, password?).
PageOne page. Drawing surface for text, images, paths, annotations, widgets, and tagged content blocks.
PageSizeReadonly record struct in points. Built-ins: Letter, Legal, Tabloid, A3, A4, A5.
FontFont handle for drawing — one of the standard 14 (FontFamily + FontStyle) or an EmbeddedFontFace.
FontFamily / FontStyleEnums covering the standard 14 (Helvetica / Times / Courier / Symbol / ZapfDingbats) and Regular / Bold / Italic / BoldItalic.
EmbeddedFontFaceLoads TTF / OTF (CFF1) bytes for embedding. Subsetting happens at save time.
Type3Font / Type3GlyphBuilderProcedural fonts: glyphs drawn as content streams. Auto-emits /ToUnicode.
ImageRaster image XObject. Construct via FromFile, FromJpeg, FromPng; same instance dedups across pages.
ImageMask1-bit stencil mask for use as an image's /Mask or via DrawImageMask.
FormXObjectReusable content stream for headers, watermarks, logos — drawn via page.DrawForm.
PathVector path with full PDF path operators: move, line, curve, close, fill rule, dashes, joins.
ColorColour value — Rgb, Cmyk, Gray factories, plus named constants.
ColorSpace + subclassesCalGrayColorSpace, CalRgbColorSpace, LabColorSpace, SeparationColorSpace, DeviceNColorSpace.
Shading + subclassesAxialShading, RadialShading, FunctionBasedShading for gradients and procedural fills.
TilingPatternTiling pattern XObject (PaintType 1 coloured / 2 uncoloured); fill paths/text via the pattern colour space.
TransparencyGroupPage-level /Group attributes (Isolated / Knockout / blending colour space) for ISO 32000-2 ยง11.6.6 compositing.
OptionalContentGroup / LayerScopeLayered content (OCGs); toggleable visibility in viewers.
StructureElement / StructureAttributesTagged-PDF structure tree elements with attribute bundles.
OutlineTree / OutlineItemBookmark tree for the document /Outlines dict.
PageLayout / PageMode / ViewerPreferencesCatalog-level viewer presentation settings.
Measure + subclassesRectilinearMeasure (/RL), GeospatialMeasure (/GEO) and NumberFormat.
CoordinateSystemEPSG / WKT projection paired with GeospatialMeasure.
ViewportPer-page viewport tying a region of the page to a measurement system.
LinearizerStatic rewriter; takes any PDF and re-emits it in ISO Annex F fast-web-view form.
IncrementalUpdaterAppend-only edits to an existing PDF without rewriting unchanged bytes.
ConformanceFlags enum: PDF/A-1b, 2A/2B/2U, 3A/3B/3U, PDF/UA-1, UA-2.
ConformanceValidatorStatic validator; doc.Validate() shorthand returns IReadOnlyList<ConformanceIssue>.
ConformanceIssue / ConformanceSeverityOne issue from validation: code, message, severity (Error / Warning).
ConformanceExceptionThrown by Save when ThrowOnConformanceError is set and validation fails.
EmbeddedFileEmbedded file stream — the body of a /Filespec.
AssociatedFile / AfRelationshipCatalog / page / annotation /AF entries with relationship enum (Source / Data / Alternative / Supplement / EncryptedPayload / FormData / Schema / Unspecified).
PieceInfoEntryEditor metadata round-trip via the page /PieceInfo dict.
IccProfileICC profile blob attached to images / colour spaces.

Namespace JetsonPDF.Annotations

Every annotation subtype shipped. Add via page.AddAnnotation(...) or convenience helpers like page.AddLink(...).

TypePurpose
AnnotationAbstract base — rectangle, page link, contents, colour, flags.
LinkAnnotationClickable rectangle — URI, GoTo, GoToR, Launch, Hide, SetOCGState, ImportData, Sound actions.
TextMarkupAnnotation + TextMarkupKindHighlight / Underline / StrikeOut / Squiggly with quad-point geometry. Uses Quad.OverText for accurate ascent/descent.
FreeTextAnnotationFree-floating text annotation with optional callout, justification, font.
GeometricAnnotation + subclassesLineAnnotation, SquareAnnotation, CircleAnnotation, PolygonAnnotation, PolyLineAnnotation, InkAnnotation.
LineEndingLine-ending style enum (Square, Circle, Diamond, OpenArrow, ClosedArrow, …).
StampAnnotationRubber-stamp annotation with user-supplied or built-in icon name.
CaretAnnotationEditorial caret marker.
FileAttachmentAnnotation + FileAttachmentIconEmbedded-file marker; carries a EmbeddedFile + filespec.
PopupAnnotationPopup window for a parent markup annotation's notes.
SoundAnnotationSound clip annotation; raw PCM with sample rate / channels metadata.
RedactionAnnotationRedaction marker (visible rectangle plus future-application metadata).

Namespace JetsonPDF.Forms

AcroForm widgets. All inherit Widget; add via page.AddTextField, AddCheckBox, AddRadioGroup, AddComboBox, AddListBox, AddPushButton, AddSignatureField, AddBarcodeField.

TypePurpose
WidgetAbstract widget base — field name, rectangle, flags, optional /AA additional actions.
TextFieldSingle- or multi-line text input. Combs, password, multi-line, max length.
CheckBoxOn/off checkbox; IsChecked default state.
RadioGroup / RadioButtonMutually-exclusive radio group with multiple RadioButton children.
ComboBox / ListBoxChoice fields. Sort, multi-select, commit-on-select-change.
PushButtonClick button with caption and WidgetAction.
SignatureFieldEmpty /Sig placeholder for an external signing pass.
BarcodeField2D barcode field (§12.7.4.5) painted from a caller-supplied bool[,] module matrix.
BarcodeSymbologyEnum: QRCode / DataMatrix / PDF417 / Code128 / Code39.
AdditionalActions/AA trigger map: Keystroke / Format / Validate / Calculate / mouse events.
SignatureSeedValue / SeedValueFlagsFilter / sub-filter / digest / reasons / MDP constraints emitted as /SV.
FieldLock / FieldLockActionStatic /Lock dict: All / Include / Exclude.
FieldAlignmentLeft / Center / Right alignment for field appearance streams.
Pdf*CollectionPer-document widget enumerators (TextFieldCollection, …) iterating across all pages.

Encryption & signatures

All in JetsonPDF namespace; grouped here by purpose.

TypePurpose
EncryptionOptionsUser / owner password, permissions, algorithm. Assign to doc.Encryption.
EncryptionAlgorithmEnum: Aes128 (V4 R4) and Aes256 (V5 R6, PDF 2.0).
PermissionsFlags enum: Print / Modify / CopyContent / AddAnnots / FillForms / Accessibility / Assemble / PrintHigh.
SignerStatic. Sign(byte[], options) / Sign(input, output, options). Detached PKCS#7.
SignatureOptionsCertificate, reason, location, contact, field name, hash algorithm, reserved-bytes, optional DocMDP / FieldMDP.
DocMdpPermissionNoChanges / FormFilling / FormFillingAndAnnotations.
FieldMdpRestrictionPer-field MDP transform: All / Include / Exclude.
Timestamper / TimestampOptions / PdfTimestampClientRFC 3161 DocTimeStamp via caller-supplied or built-in HTTP TSA client.
DssStatic. AddSecurityStore writes /DSS + per-signature VRI for PAdES B-LTA.
DocumentSecurityStore / VriDocument-level cert / CRL / OCSP store + per-signature VRI sub-dict.

Namespace JetsonPDF.Reading JetsonPDF.Reader.dll

Read-side DTOs. Everything starts with Reader.Load.

TypePurpose
ReaderStatic entry point. Load(string | Stream | byte[], password?)ReadDocument.
ReadDocumentParsed document: Pages, Info, Outlines, PageLabels, NamedDestinations, PageLayout, PageMode, ViewerPreferences, OpenAction, Language, IsEncrypted, EncryptionAuthenticated, OutputIntents, Conformance, DocMdpPermission, CalculationOrder.
ReadPageOne page: dimensions, Items (text / vector / image / inline-image / form-XObject), annotations, widgets.
PageItem + subclassesPageTextItem, PagePathItem, PageImageItem, PageInlineImageItem, PageFormXObjectItem.
ReadOutlineItemBookmark-tree node with title, destination, child list.
ReadStructureTree / ReadStructureElement / ReadStructureAttributesTagged-PDF tree, recursively. AnnotationRefs resolves OBJR child refs.
ReadOptionalContentGroupOCGs and the catalog /D default config.
ReadOutputIntentOutput intent (PDF/A / PDF/X) with ICC profile and identifier.
ReadSignatureSignature field metadata: signer, time, reason, MDP / FieldMDP, integrity status.
ReadSignatureSeedValue / ReadFieldMdpRestriction/SV and FieldMDP transform read-back.
ReadDocumentSecurityStore / ReadVriCatalog-level /DSS with VRI sub-dict (cert / CRL / OCSP).
ReadAdditionalActionsField /AA trigger map round-trip.
ReadMeasure / ReadViewport / ReadNumberFormat / ReadCoordinateSystem§12.9 / §12.10 measurement and geospatial DTOs.
ReadTilingPatternTiling-pattern read-back with module matrix.
ReadBarcodeMetadataSymbology + module matrix recovered from a barcode field.

Namespace JetsonPDF.Forms (editing existing AcroForms) JetsonPDF.Forms.dll

Fill, modify, and save existing AcroForm PDFs via a single-layer incremental update. Top-level entry point is Form.Open; mutations are queued on FormField instances and committed on Save. Repeated Save() calls within one Form instance produce byte-identical output — mutations are re-applied against the original source bytes, never stacked on a previous save. See jetsonpdf-forms-api.pdf for the full member list.

TypePurpose
FormEntry point. Form.Open(string | byte[] | Stream, password?)Form. Fields, Clear(), Save() / Save(path | Stream | SaveMode), Dispose.
FormFieldCollectionIndexer form.Fields["name"], Contains, TryGet, IEnumerable<FormField>, stable iteration order.
FormFieldOne discovered field. Properties: Name, Type, Value, Options, MaxLength, IsReadOnly, IsRequired, IsSigned, Rect, PageIndex. Fluent mutators: SetText, SetImage, SetChoice, SetChoices, SetChecked, Toggle, SelectRadio, Clear.
FormFieldTypeEnum: Text, CheckBox, Radio, PushButton, ComboBox, ListBox, Signature, Unknown.
ImageAlignmentEnum for SetImage placement: Center (default, aspect-preserved), TopLeft, TopRight, BottomLeft, BottomRight, Stretch.
SaveModeOutput strategy passed to Form.Save. SingleLayer (the default) emits original bytes + one incremental section.

SetImage bakes a Form XObject /AP /N at the widget's rect. The markReadOnly parameter (default true) sets the field's ReadOnly bit so Acrobat renders the appearance immediately on text widgets. ReadOnly is never applied to signature widgets — the user must remain able to invoke Sign. Signed signature widgets reject all mutations because the cryptographic byte range covers /AP.

Namespace JetsonPDF.Composition JetsonPDF.Composition.dll

Page-level assembly — extract a subset of pages into a new PDF, or merge whole PDFs into one. Lossless COS object-graph copy (not a render pass); outlines, named destinations, and AcroForm fields carry over with cross-document collision handling. Both types are static and thread-safe. See the Composition guide for the full walkthrough, or jetsonpdf-composition-api.pdf for the paginated reference.

TypePurpose
PageExtractorStatic. Extract(byte[] source, params int[] pageNumbers) (1-based, order-preserving so it reorders / duplicates), Extract(byte[], string password, …), file- and Stream-based overloads, and ExtractRange(byte[], firstPage, lastPage) for an inclusive range.
MergerStatic. Merge(params byte[][] sources) / Merge(IEnumerable<byte[]>)byte[], plus Merge(IEnumerable<string> inputPaths, string outputPath) and Merge(IEnumerable<Stream> inputs, Stream output). Concatenates in order; sources must be decrypted first.

Namespace JetsonPDF.Fluent JetsonPDF.Fluent.dll

QuestPDF-style fluent layout API. Compose a FluentDocument from Page + slot containers (Header/Footer/Background/Foreground/Content); pages auto-paginate on overflow. Two-pass renderer resolves {TotalPages} after layout. See jetsonpdf-fluent-api.pdf for the full member list.

TypePurpose
FluentDocumentEntry point. FluentDocument.Create(d => d.Page(...)) → configure with WithMetadata / WithFonts / WithOutline / WithConformance / WithLanguage / WithOutputIntent / WithPageLabels / WithLayer; render via GeneratePdf() / GeneratePdf(path | Stream) (the no-arg overload returns a byte[]).
IDocumentContainerReceives .Page(p => ...) calls — one block per page descriptor (each block can paginate to many physical pages).
IPageDescriptorPer-page config: Size, Margin, DefaultTextStyle, plus the five layered slots: Background, Header, Content, Footer, Foreground.
IContainer + extensionsThe fluent slot. Layout decorators: Padding*, Width/Height/Min*/Max*, AlignLeft/Center/Right/Top/Middle/Bottom, Background, Border, AspectRatio, Translate, Rotate, ShowOnce/SkipOnce/ShowEntire/EnsureSpace, Layer, Section/SectionLink/Link.
ColumnDescriptor / RowDescriptorVertical / horizontal containers via .Column(c => c.Item().Text(...)) / .Row(r => r.RelativeItem(); r.ConstantItem(80)).
TableDescriptor + TableHeaderDescriptor/TableFooterDescriptor.Table(t => { t.ColumnsDefinition(c => c.RelativeColumn(); c.ConstantColumn(80)); t.Header(h => ...); t.Cell(columnSpan, rowSpan).Text(...); t.Footer(f => ...); }). Auto-paginating body, repeating header, last-page footer, row-span atomic blocks.
TextDescriptorRich text inside .Text(t => t.Span("...").Bold(); t.CurrentPageNumber(); t.TotalPages()). Per-run Bold/Italic/Underline/FontSize/FontColor; multi-line wrap.
TextStyleMutable style: FontFamily (string), FontSize, FontStyle, FontColor, LineHeight, ….
FontRegistryCustom-font registration: RegisterFromFile / RegisterFromBytes. Standard 14 work without registration.
ColorsMaterial-palette static class: Colors.Grey50, Colors.IndigoDark, …, plus Colors.FromHex("#213F85").
Form-widget extensionsOn any IContainer leaf: .AsTextField(name), .AsCheckBox, .AsComboBox(name, options), .AsListBox, .AsPushButton(name, caption). Acrobat draws the chrome.
IDynamicComponent / IDrawingSurfacePer-page content via .Component(IDynamicComponent); raw drawing escape via .Canvas((surface, w, h) => ...).
OutlineBuilder / PageLabelsBuilder / LayerHandleHelpers for WithOutline, WithPageLabels, and OCG layer scoping.

Namespace JetsonPDF.Flow JetsonPDF.Flow.dll

Word-like retained-mode DOM. Build a FlowDocument tree of SectionParagraph/Table/BlockImage/PageBreak, then Save. The renderer paginates over JetsonPDF.Fluent. See jetsonpdf-flow-api.pdf for the full surface.

TypePurpose
FlowDocumentTop-level. Title, Author, DefaultRunProperties, Sections, Styles, AutomaticOutline, Hyphenator, ConfigureFonts; AddSection / AddStyle; Save() / Save(path | Stream) (the no-arg overload returns a byte[]).
SectionPage-setup unit: PageSize, PageMargins, StartsOnNewPage, ColumnCount/ColumnGap, FootnoteAreaHeight, Header/Footer/Body blocks.
ParagraphBlock of inline runs. Style (built-in), StyleName (named), Alignment, SpaceBefore/SpaceAfter, LineSpacing, LeftIndent/RightIndent, FirstLineIndent, KeepWithNext/KeepLinesTogether, PageBreakBefore, ListMarker, DropCap, FloatImage, TabStops, Bookmark.
Run helpersInside p => ...: AddText("...").Bold().Italic().Underline().Strikethrough(), .Link(url), .Comment(author, text), .AsInsertion/AsDeletion (track changes); plus p.AddPageNumber(), p.AddPageCount(), p.AddFootnote(text), p.AddEndnote(text), p.AddTab().
RunProperties / ParagraphPropertiesThe cascading style buckets used by DefaultRunProperties and NamedStyle.
NamedStyle / ParagraphStyleUser-defined named styles with a BasedOn chain. ParagraphStyle = built-in palette (Heading1..Heading3, Quote, Caption, Body, …).
Table + TableRow + TableCellBlock-level table. Columns (relative weights), Header/Body, RepeatHeader, CellBorderWidth, CellPadding; cells take a string or a Paragraph.
BlockImage / AnchoredImage + AnchorSideInline block image, plus floating image (FloatImage on a paragraph) with text wrap.
PageBreakHard page break inside a section body.
ListMarker / ListKindAuto-counter list bullets / numbers / roman / letter at level; hanging indent.
DropCapDecorative drop cap at the start of a paragraph (LineSpan).
TableOfContents / EndnoteList / CommentListAuto-collected document blocks — place inside any section body.
TabStop + TabAlignmentPer-paragraph tab stops, paired with p.AddTab() calls.
Hyphenation.HyphenatorOptional Liang-pattern hyphenator. Hyphenator.EnglishDefault(); line-breaker prefers soft-hyphen splits.
StylePresetsStatic helpers that prebuild common NamedStyle bundles.

Namespace JetsonPDF.Wpf JetsonPDF.Wpf.dll (net8.0-windows)

TypePurpose
PdfToXamlConverterStatic. Convert(ReadDocument, options?) → XAML string (a StackPanel of Canvas pages).
PdfToXamlOptionsKnobs for the converter: page background, scale, image format, ….
Base64ImageExtensionMarkup extension {jetsonpdf:Base64Image} — decodes inline base64 image bytes without touching disk.
StandardFontMapWPF FontFamily ↔ PDF standard-14 mapping used by both converters.

Sub-namespace JetsonPDF.Wpf.Authoring

TypePurpose
XamlToPdfConverterStatic. Convert(string xaml, options?)byte[] or (string, Stream, options?) overload. STA-only.
XamlToPdfOptionsDPI / image quality / font fallback options for the authoring pipeline.
DocumentXAML root element <jetsonpdf:Document>: PageSize, Landscape, Title, Author, Pages collection.
PageMember of Document.Pages with optional per-page size/landscape overrides.
PaginatedTable + PaginatedColumnMulti-page table with auto-overflow and repeating headers; jetsonpdf:Pagination.HideOnOverflow attached prop.
Form (attached props)jetsonpdf:Form.FieldName + MaxLength / IsMultiline / IsPassword / Action — turn a TextBox/CheckBox/ComboBox/ListBox/Button into an AcroForm widget.
PageNumberExtension / PageCountExtensionMarkup extensions {jetsonpdf:PageNumber} / {jetsonpdf:PageCount}; resolve per page during authoring.
VisualTreeEmitterThe walker that turns an arranged WPF visual tree into PDF drawing operators. Public for advanced extension scenarios.

Namespace JetsonPDF.OpenSilver JetsonPDF.OpenSilver.dll (netstandard2.0)

The OpenSilver-side counterpart to JetsonPDF.Wpf: same xmlns:jetsonpdf authoring dialect, walker runs on the OpenSilver layout pass. See the OpenSilver guide for hosting, the JS bridge, and the showcase.

TypePurpose
Base64ImageExtensionMarkup extension {jetsonpdf:Base64Image Data='…'} — wraps the payload in a data: URI so OpenSilver's BitmapImage decodes it natively.
WidgetActionsAttached behaviour for AcroForm widgets emitted by PdfToXamlConverter: URI / Named("Print") / ResetForm dispatch via browser JS interop.
IJpegPixelDecoder / IJpxPixelDecoderOptional hooks: decode JPEG / JPEG 2000 bytes to RGB24 pixels so ResourceCache can composite a paired SMask alpha. Without one registered, JPEG+SMask alpha is dropped (the JPEG renders opaque).
OpenSilverImageDecodersStatic slots (.Jpeg, .Jpx) where consumers plug in the decoders above — e.g. a SkiaSharp / ImageSharp wrapper.

Sub-namespace JetsonPDF.OpenSilver.Authoring

TypePurpose
XamlToPdfConverterStatic. ConvertAsync(string xaml, options?)Task<byte[]> or (string, Stream, options?) overload. Async (OpenSilver image loading is async).
OpenSilverTreeWalkerWalker implementing IXamlTreeWalker. Set HostContainer to a hosted Panel for accurate layout in a Wasm host.
Document / Page / Form / PaginatedTable / …Same authoring dialect as the WPF integration — types come from the shared JetsonPDF.XamlToPdfConverter.Authoring projitems, compiled into the OpenSilver namespace under the OPENSILVER conditional.
PageNumberExtension / PageCountExtensionMarkup extensions {jetsonpdf:PageNumber} / {jetsonpdf:PageCount}; resolve per page during the walk.

Namespace JetsonPDF.Tiff — PDF → TIFF rasterization

Rasterize a PDF into a multipage TIFF. All types live in the JetsonPDF.Tiff namespace but ship across three packages: the managed codec (JetsonPDF.Tiff, netstandard2.0), the Windows desktop converter (JetsonPDF.PdfToTiffConverter, net8.0-windows), and the browser converter (part of JetsonPDF.OpenSilver).

TypePurpose
PdfToTiffConverterStatic, Windows-only (STA). ConvertToFile(pdfPath, tiffPath, options?, progress?) / ConvertToFileAsync, stream-based ConvertAsync(ReadDocument, Stream, ...), and RenderPageAsync(ReadPage)BitmapSource. Drives the WPF PdfToXamlConverter + RenderTargetBitmap render path.
PdfToTiffOptionsConversion knobs: Dpi, Compression, ColorMode, BlackAndWhiteThreshold, MultipageStrategy, Pages, BackgroundArgb, RowsPerStrip, XamlOptions. ParsePageRange("1-3,5") builds a page list from a spec.
TiffColorMode / TiffMultipageStrategyEnums: Color / Grayscale / BlackAndWhite; SingleMultiPage / OneTiffPerPage.
PdfToTiffBrowserConverterStatic, in JetsonPDF.OpenSilver. ConvertAsync(byte[] pdfBytes, Panel host, TiffWriteOptions?, progress?)Task<byte[]> — rasterizes in WebAssembly via html2canvas.
TiffConversionProgress / TiffConversionStageProgress payload reported by both converters: weighted Fraction, bindable Description, Stage (Starting / ConvertingXaml / Rendering / Encoding / Completed).
TiffImage / TiffFrameTIFF reader. TiffImage.Decode(bytes) → multi-frame image; each TiffFrame exposes EncodePng() and ToDataUri() so browsers (which can't render TIFF) can display it.
TiffWriter / TiffEncodeFrame / TiffWriteOptionsManaged TIFF writer. TiffWriter.Encode(frames, options) chains IFDs for multi-frame output; None / PackBits / Deflate / AdobeDeflate compression.
TiffCompression / TiffEncodePixelFormatEnums: compression codes; Rgb / Rgba / Grayscale / BlackAndWhite on-disk pixel formats.

See the API in use →