Click or drag to resize
Pdf Library for .NET

Version 26.4 Release Notes - SelectPdf Html To Pdf Converter

The first release of SelectPdf.HtmlToPdf.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.HtmlToPdf.Universal.

The Community edition (SelectPdf.HtmlToPdf.Universal) converts HTML to PDF, up to 5 pages per document, with no license key and no watermark. Compared with Select.HtmlToPdf 26.3 it does not include HtmlToImage, HiddenWebElements, the tagging API, document open actions, PdfStandard.PdfA3A or ConvertToPdfA; these are in the Full edition.

At a glance

Area

SelectPdf 26.3

SelectPdf.HtmlToPdf.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 and ConvertHtmlStringAsync, with cancellation

Archiving

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

PDF/A-1b to PDF/A-3u, PDF/A-4, 4e and 4f, PDF/X-1a

Default encryption

RC4 128-bit

AES 256-bit (revision 6)

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. 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

  • 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.

  • PdfBookmarkOptions.HierarchicalBookmarks nests the outline by selector level.

Security and Signatures

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

Standards

  • PdfStandard.PdfA4, PdfA4E, PdfA4F.

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.

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.

  • Passwords on PDF/A or PDF/X documents are refused.

  • The Producer of generated PDF files reads SelectPdf Html To Pdf for .NET Community Edition 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.

  • The Community edition converts up to 5 pages per document. Word to PDF, redaction, signature validation, HtmlToImage, tagging and ZUGFeRD are in the Full edition (SelectPdf.Universal).

See Also