Docs / Reference

FAQ and troubleshooting

Quick answers to common questions, followed by the errors people run into most often and what they mean.

Frequently asked questions

For individuals and for organisations with annual revenue under US$1 million, yes: the Community license is free, including for commercial products. Larger organisations need a Professional (per developer) or Enterprise license; see Pricing and the license agreement.

No valid license key is active, so saved pages carry the evaluation banner (and SoftZenPdf.Ocr starts plain text with a notice line). Call PdfLicense.SetKey at startup or set the SOFTZENPDF_LICENSE_KEY environment variable, and check PdfLicense.Status, which says why a key was rejected. See Licensing.

No. Keys are verified offline with a digital signature, and SoftZenPdf never contacts a server.

Nothing changes for the versions you already use: the license is perpetual for every version released during your year of updates. Newer versions need a renewed key; with an old key they run in evaluation mode, and PdfLicense.Status says so.

Yes, with HtmlConverter, which uses SoftZenPdf's own HTML parser, CSS engine and layout engine rather than a browser. It handles document-style HTML: text, lists, tables, images, links and page setup. It does not run JavaScript or lay out flexbox, grid or floats; see HTML to PDF.

Yes. PdfDocument.FromImages makes a page for each JPEG, PNG, GIF, BMP or TIFF file, and for each page of a multi-page TIFF. Pages can match each image's size at its resolution, or fit a page size with margins; black-and-white scans stay at one bit per pixel. See Converting images to PDF.

Yes, with the SoftZenPdf.Ocr package, which uses the Tesseract 5 engine. It recognises words with their positions and confidence, turns images into searchable PDFs (PDF/A-2b too), and makes existing scanned PDFs searchable without changing the original file. It is a separate package because it needs native Tesseract libraries and downloaded language data. Your SoftZenPdf license covers it. See OCR and searchable PDFs.

Yes, with the SoftZenPdf.Redact package. Drawing a black rectangle over text only hides it: the text is still in the file and can be copied or extracted. PdfRedactor removes the covered text, shapes and image pixels from the page content itself, cleans matching metadata, notes and form values, and writes a new file without the original's history, then checks the result. Your SoftZenPdf license covers it. See Redaction.

Yes, with the SoftZenPdf.Optimizer package. You choose the optimizations: stream compression and object streams, removing duplicate fonts and images, recompressing JPEGs, compressing bitmaps losslessly or converting photos to JPEG, downsampling images to a target resolution, and converting CMYK images to RGB. Each object is replaced only when smaller, encryption is kept, and the result reports what changed. Your SoftZenPdf license covers it. See Optimizing file size.

It targets net8.0, so it runs in any .NET 8, 9 or 10 application. .NET Framework and older .NET versions are not supported.

It has no NuGet dependencies, no native binaries and no platform-specific APIs, so nothing ties it to Windows. It is developed and tested on Windows; other platforms have not been tested yet.

Yes: dotnet add package SoftZenPdf installs it from nuget.org. You can also build it from source, as described in Getting started.

Not yet. HTML and images can be converted; Word (.docx) conversion is not supported.

No. SoftZenPdf reads PDF structure and text but has no rasteriser.

Yes, with FlowDocument, which wraps and justifies paragraphs, breaks pages and continues tables across them; see Flowing documents. On a page, DrawText draws one line where you ask, and the text guide shows how to wrap it yourself.

The standard 14 fonts only cover Western European characters (WinAnsiEncoding), and a TrueType font can only draw characters it has glyphs for. Use a TrueType font that covers your text, and check coverage with TryGetGlyphId; see Custom font embedding.

No. You can import pages into a new document and draw on top of them, fill form fields, merge, split and rotate, but not change the existing text.

No. You can add empty signature fields for a signing application to fill, but SoftZenPdf does not create or validate signatures.

Open it with the owner password and copy its pages into a new document with PdfDocument.Merge(reader); the encryption guide shows how. Bookmarks, form structure and metadata are not carried over.

Text is returned in the order the page draws it. Try TextOrder.Visual, which sorts runs into lines. Multi-column layouts are not reconstructed. See Text extraction.

Yes. Draw it with a TrueType font that has the letters and it is ordered right to left automatically, including mixed lines with numbers or Latin words; see right-to-left text. Arabic letters are joined and their dots and vowel marks placed by the font's own tables, so use a font made for Arabic; see Arabic. Indic scripts such as Devanagari are not shaped yet.

The PDF uses a font that gives no way to map those characters to Unicode (no ToUnicode map, usable encoding or glyph names). SoftZenPdf outputs U+FFFD for them and adds a note to reader.Warnings.

Incremental updates can only be appended to intact files. Re-save the PDF with another tool (for example qpdf) so its cross-reference data is valid, then fill it.

Individual PdfDocument, PdfReader and PdfFormFiller instances are not; use one instance per thread.

No benchmarks have been published. Documents are held in memory while they are built or read, so memory use grows with document size, mostly with embedded images.

SoftZenPdf validates PDF/A-2b output with its own checks, a subset of ISO 19005-2. A cross-check with veraPDF is still pending, so validate archival files with veraPDF as well. See PDF/A compliance.

Write to info@softzensystems.com. Please include the SoftZenPdf version, a small code sample and, for reading problems, the PDF if you can share it.

Troubleshooting common errors

Exception or symptomCause and fix
ArgumentException: Character … has no WinAnsiEncoding codeA standard font cannot show the character. Use a TrueTypeFont.
ArgumentException: Font … has no glyph for U+…The TrueType font lacks that character. Use a font that covers it, or check with TryGetGlyphId.
NotSupportedException: CFF-flavored OpenType fonts (OTTO) are not supportedThe font has CFF outlines. Use the TrueType (.ttf) build of the font.
NotSupportedException: … Restricted License / forbids subsetting / bitmap embedding onlyThe font's licence does not allow this kind of embedding. Use a different font.
InvalidOperationException: content ends inside a text object / unmatched SaveStateBalance BeginText/EndText and SaveState/RestoreState, or use the Draw… helpers.
InvalidOperationException: '…' is not allowed inside a text objectPath and state operators must be outside BeginText…EndText.
PdfPasswordException: The password is incorrectPass the user or owner password to PdfReader.Open or PdfFormFiller.Open.
UnauthorizedAccessException when merging, extracting or fillingThe encrypted source does not grant that permission. Open it with the owner password.
KeyNotFoundException: The form has no field named …Use a name from the list in the message, or from PdfFormFiller.Fields. Names of nested fields are joined with dots.
PdfAException when savingThe PDF/A document breaks the rules listed in the message; fix each violation, or turn off ValidateOnSave to inspect the output.
NotSupportedException: Stream filter /… is not supported yetReading hit a compression filter SoftZenPdf cannot decode; text on that page may be missing.
Nothing appears on the pageCheck coordinates: y grows upwards from the bottom edge, and A4 is about 595 × 842 points.