Click or drag to resize
Pdf Library for .NET

Version 26.4 Release Notes - SelectPdf Library for .NET

The first release of SelectPdf.Universal: the SelectPdf library rebuilt to run on Windows, Linux and macOS, with one Chromium engine and the class and member names you already use from SelectPdf 26.3. This topic lists what is new compared with 26.3 and which defaults changed. For moving existing code over, see Migrating to SelectPdf.Universal.

At a glance

Area

SelectPdf 26.3

SelectPdf.Universal 26.4

Operating systems

Windows

Windows (x64, x86), Linux (x64, arm64), macOS (Apple Silicon)

.NET targets

.NET Framework 2.0 to 4.7.2, .NET Standard 2.0

.NET Standard 2.0 (.NET Framework 4.6.1 and later), .NET 8, .NET 10

HTML engines

WebKit, Blink, Chromium (CEF 148)

Chromium only (CEF 154.0.28)

Engine hosting

A separate engine process per conversion

In process by default, a separate process on request; the same API for both

Concurrent conversions

4 by default

8 by default, queued in arrival order

Asynchronous API

None

ConvertUrlAsync, ConvertHtmlStringAsync, AddAsync, with cancellation

Word to PDF

Not available

docx, doc, rtf, txt, WordML, html and markdown

Redaction

Not available

By area, text or regular expression

Signatures

Signing

Signing (SHA-256) and validation, with trust and revocation checks

Accessibility

PDF/UA-1

PDF/UA-1 and PDF/UA-2 on new, converted and loaded documents

Archiving

PDF/A-1b to PDF/A-3a, PDF/X-1a

Adds PDF/A-4, 4e and 4f, and ZUGFeRD / Factur-X invoices

Default encryption

RC4 128-bit

AES 256-bit (revision 6)

Printing

PdfPrinter

Not included (it depended on Windows printing)

New features

Everything in this section is new compared with SelectPdf 26.3.

Engine and Performance

  • In-process Chromium host. Chromium starts once inside your application and each conversion gets a fresh, isolated browser. Measured medians on Windows: a small page 544 to 132 ms, a Bootstrap page 745 to 160 ms; on Linux 287 to 59 ms and 427 to 67 ms. Choose the host with GlobalProperties.ChromiumEngineHostMode or the SELECTPDF_CHROMIUM_ENGINE_HOST environment variable. See Chromium Engine.

  • ForceOutOfProcess sends a single conversion to a separate engine process, for untrusted pages or different per-process settings.

  • HttpCache (Clear, ThirdParty, All) controls what the HTTP cache keeps between conversions. Cookies and storage are cleared after every conversion in all modes.

  • Asynchronous API.HtmlToPdf.ConvertUrlAsync and ConvertHtmlStringAsync, with CancellationToken overloads; HtmlToImage async methods and PdfCanvas.AddAsync. No thread is held while Chromium works, and HTML headers and footers render in parallel with the page. See Asynchronous Conversion.

  • WebGlEnabled on every engine-driven type, off by default. Leaving WebGL off saves about 1.9 s per conversion on Windows. Turn it on for pages that draw with WebGL; 2D canvas works either way.

HTML to PDF

  • VisibleWebElementSelector converts part of a page using any CSS selector, for example .infobox. A selector that matches nothing fails the conversion instead of printing the whole page. VisibleWebElementId remains as an obsolete shortcut.

  • Content trimming. The last page ends where the content ends, on documents of any length. ManagedContentTrimming turns it off; ManagedContentTrimmingMode chooses between Ink (the default, measures the painted content) and Marker.

  • WebPageFixedSize with WebPageHeight now cuts PDF output at that height. Content below the cut is removed from the file, and the cut never splits a line of text.

  • PdfHtmlElement flows onto the following pages from wherever it starts on the page, keeps its column on every page, and keeps the links and bookmarks of the rendered HTML.

  • HtmlToImageElement draws HTML onto a page as an image.

  • PdfBookmarkOptions.HierarchicalBookmarks nests the outline by selector level.

Word to PDF

  • WordToPdf converts docx, docm, dotx, dotm, doc, dot, rtf, txt, WordML, html and markdown from a file, stream or byte array, with WordToPdfOptions and WordToPdfResult. See Getting Started.

  • WordPageSetup keeps the document's own page sizes (Document) or reflows onto the converter's page size and margins (Options). WordBookmarks builds the outline from headings or from Word bookmarks.

  • PdfWordSection puts a Word document in a header or footer; PdfWordElement draws one into a page region and continues onto the following pages.

  • Word output supports the same headers, footers, security, PDF/A and PDF/X settings as HTML output, and can be tagged as PDF/UA-1, PDF/UA-2, PDF/A-3a or PDF/A-4.

Redaction

  • PdfRedactionManager removes content from existing PDF files by rectangle, by text, or by regular expression. Text, images, vector graphics, links, annotations and form fields inside the areas are deleted from the file, not only covered. See Pdf Redaction.

  • A text redaction also removes the text from document properties, XMP metadata, bookmarks, annotations, form values and attachments.

  • FillColor, OverlayText and OverlayTextColor style the boxes. Tagged, PDF/A and encrypted documents keep their structure, conformance and passwords.

Security and Signatures

  • Signature validation:PdfSecurityManager.ValidateSignatures() returns a PdfSignatureValidationResult per signature, covering integrity, whether the signature covers the whole document, trust (operating system roots plus roots you supply), time stamps and, with RevocationCheckEnabled, revocation. See Digital Signatures.

  • Encryption:KeySize and Algorithm on PdfDocumentSecurity and PdfSecurityOptions, including PDF 2.0 EncryptKey256BitRevision6 and AESGCM. EncryptMetadata controls whether the XMP metadata is encrypted.

  • Signing uses SHA-256, and a document that is already signed is saved incrementally, so its existing signatures stay valid when you add pages, fill fields or sign again.

Standards

  • AccessibilityStandard (PdfUAStandard.UA1, UA2) on PdfDocument, HtmlToPdfOptions and WordToPdfOptions. PDF/UA-2 documents are written as PDF 2.0 with structure destinations, and a declared document is checked when it is saved. See Accessible PDF and PDF/A.

  • PdfStandard.PdfA4, PdfA4E, PdfA4F. PDF/A-4 combined with PDF/UA-2 validates against both.

  • ZUGFeRD / Factur-X:PdfDocument.AddZugferdInvoice embeds the invoice XML and writes the required metadata for every profile; AddXmpExtensionSchema writes custom XMP metadata. See Electronic Invoices.

  • PdfDocument.ConvertToPdfA converts an existing PDF to PDF/A (1b to 3a), substituting any font it needs to embed.

Documents, Pages and Fonts

  • Cross-platform system fonts:PdfSystemFont, PdfSystemFonts and PdfFont.CreateFromSystemFont replace System.Drawing.Font. Fonts load from files, streams or bytes with PdfFont.CreateFromFile, CreateFromStream and CreateFromBytes.

  • Bundled fallback fonts (Liberation, Latin scripts), so text renders on a server with no fonts installed.

  • SelectPdf.Universal.Fonts package: Noto fonts for every script, color emoji included, copied next to the application on Linux and macOS, so Arabic, Chinese, Japanese, Korean, Hindi, Thai and other scripts render on hosts and containers with no fonts. The application's own fonts are read from a fonts folder next to it, on every platform. See Fonts and Languages.

  • PdfResizeManager gains ViewerPreferences and Security, set on the resized document.

  • PdfFormManager.CompactSave writes a compacted file instead of an incremental update.

Behavior changes
  • WebGL is off unless you set the new WebGlEnabled to true. Pages that draw with WebGL need it; 2D canvas is not affected.

  • The engine runs in process where the host library is installed with the engine. A 32-bit process using the x64 engine package falls back to the separate process automatically.

  • MaximumConcurrentConversions is 8 (26.3: 4). LazyImagesLoadingDelay is 40 ms (26.3: 20 ms).

  • Setting only a password encrypts with AES 256-bit, revision 6 (26.3: RC4 128-bit). Readers older than Acrobat X cannot open it; choose EncryptKey128Bit with AES for them.

  • HttpCache is All. When one process converts pages for different users, set HttpCacheMode.Clear so a cached response cannot reach another user's document.

  • Tagged = true builds the structure tree but no longer claims PDF/UA. Set AccessibilityStandard to declare it. On a tagged document every element needs a TagType or Artifact.

  • Combinations a file cannot satisfy are refused when saving, instead of producing a document that claims a standard it fails: PDF/UA-2 with PDF/A-1 to 3, PDF/A-4 with PDF/UA-1, PDF/A-1b with PDF/UA, and passwords on PDF/A or PDF/X documents.

  • Standard CJK fonts are placed at the requested Y position; SelectPdf 26.3 drew them about one line higher.

  • Page rotation is applied when the page is displayed, whether it is set before or after drawing, and docked templates keep their size instead of stretching to the page.

  • The Producer of generated PDF files reads SelectPdf for .NET v26.4.0.

Platforms and deployment

Install the managed package for your edition and the SelectPdf.Universal.Native.<rid> engine package for each platform you deploy to.

  • win-x64 and win-x86: Windows; no Visual C++ runtime is needed. The Windows engines and libraries are Authenticode-signed by Outside Software SRL.

  • linux-x64 and linux-arm64: glibc 2.30 or later (Ubuntu 20.04+, Debian 11+, RHEL 9+). The package includes the libraries Chromium needs, so a minimal image converts pages with no apt-get step; no X server, --no-sandbox or --shm-size is needed in Docker. See Deployment with Docker.

  • osx-arm64: macOS 13 or later on Apple Silicon, signed and notarized.

  • Windows Server Core containers are supported and need one step that installs the core Windows fonts. Nano Server is not supported.

  • Azure App Service and Azure Functions are verified on Windows and Linux; use Basic or higher. On Windows, do not use Run From Package (WEBSITE_RUN_FROM_PACKAGE): the engine cannot load its libraries from the mounted package. See Microsoft Azure.

  • Verified on Azure App Service, Azure Functions, Azure Container Apps, AWS Lambda (x64 and arm64), AWS Elastic Beanstalk (Windows and Linux) and Google Cloud Run, with a step-by-step page for each. See Cloud Deployments.

Known limitations
  • macOS is supported on Apple Silicon only. An x64 .NET process on Apple Silicon can use the arm64 engine.

  • Process-wide Chromium settings in the in-process host (proxy, WebGL, local file access) are fixed by the first conversion. Use ForceOutOfProcess for a conversion that needs different settings.

  • In process, the first conversion also starts Chromium. On small cloud plans (for example Azure S1) this first conversion can take tens of seconds.

  • PDF/UA validation can still fail for web pages whose own markup is not accessible, for example tables whose rows have different numbers of columns.

  • Word to PDF, redaction, signature validation, HtmlToImage and ZUGFeRD are not in the Community edition.

See Also