# Frequently asked questions

> Answers about PdfNetStack licensing, platforms, native dependencies, lossless compression, HTML to PDF, Arabic text, PDF/A, OCR and memory use.

Short answers to the questions people ask before they adopt PdfNetStack. Each one links to the
page with the details below.

## Where to read more

- Licensing and dependencies: [About](https://www.jadev-corp.com/about/)
- Platforms and installation: [Getting started](https://www.jadev-corp.com/getting-started/)
- Compression results and method: [Compress PDF](https://www.jadev-corp.com/guides/compress-pdf/), [Benchmarks](https://www.jadev-corp.com/benchmarks/),
  [Fidelity and verification](https://www.jadev-corp.com/concepts/fidelity/)
- Encrypted, signed and damaged files: [Safety model](https://www.jadev-corp.com/concepts/safety-model/)
- HTML to PDF: [HTML to PDF](https://www.jadev-corp.com/guides/html-to-pdf/) and [CSS support](https://www.jadev-corp.com/guides/html-to-pdf/css-support/)
- Arabic and right to left text: [Fonts and text](https://www.jadev-corp.com/guides/fonts-and-text/)
- PDF/A: [PDF/A](https://www.jadev-corp.com/guides/pdf-a/)
- OCR: [OCR](https://www.jadev-corp.com/guides/ocr/)
- Memory: [Memory and performance](https://www.jadev-corp.com/concepts/memory-and-performance/)
- What comes next: [Roadmap](https://www.jadev-corp.com/roadmap/)

A question that is not answered here? Ask it in the
[issues](https://github.com/jams4code/pdf.netstack/issues) of the repository.

## Is PdfNetStack free for commercial use?

Yes. PdfNetStack is MIT licensed. On .NET 8 and later the core package has no dependencies; on .NET Standard 2.0 it uses Microsoft's System.Memory, which is also MIT. CI blocks any runtime package that is not on a reviewed license allowlist.

## Does it need Ghostscript, a browser or other native binaries?

No. The library, the HTML to PDF package and the command line tool are managed code and start no external process. The one exception is OCR. The optional OCR add-on and its pdfnetstack-ocr tool run their models on ONNX Runtime, and pdfnetstack ocr starts that separate tool.

## Which platforms and .NET versions does it run on?

.NET 8, 9, 10 and later through the net8.0 and net10.0 targets, and .NET Framework 4.6.2 to 4.8.1, Mono, Unity and .NET Core 2.0+ through netstandard2.0. CI runs the tests on Windows, Linux and macOS, on .NET Framework 4.8, .NET 8 and .NET 10.

## Is it compatible with trimming and Native AOT?

Yes. The net8.0 and net10.0 builds of the library are marked trim and AOT compatible, and CI publishes the command line tool with Native AOT, failing on any trim or AOT warning.

## Is the compression lossless?

Yes, by default. Text, vectors, fonts, images, annotations, forms, bookmarks, structure tags, metadata and attachments are carried over, and every output is compared to its source before it is returned. Lossy changes happen only when you ask for them, as JPEG requantization with JpegQuality, and from 1.1 image downsampling with MaxImageDpi and conversion of raw photographs to JPEG, both checked against the source and optionally held back by a perceptual quality gate.

## How much smaller do files get?

On a mixed corpus of 1,296 real world files, the 1,003 files that were optimized went from 568.9 MiB to 469.0 MiB, 17.6% saved, with zero differing pixels at 150 DPI. Image heavy files often gain 20 to 40%. Files from producers that already use object streams gain little.

## What happens with encrypted or signed PDFs?

The optimizer returns them byte for byte, because rewriting would break the encryption or the signatures. The editing API opens encrypted files with a password and keeps their protection on save. Saving a signed document in full invalidates its signatures; from version 1.1, SaveIncremental appends the changes after the signed bytes and keeps them valid.

## Can PdfNetStack render PDF pages to images?

No. Rendering pages to images is out of scope for the project. It extracts the images a page contains, and the text, but it does not rasterize pages.

## Is the HTML to PDF converter a headless browser?

No. PdfNetStack.Html is a layout engine written in C# with the CSS cascade, block, inline, table, flex and grid layout and paged media. It does not run JavaScript, so pages must be rendered HTML. It ships as the PdfNetStack.Html package on NuGet.

## Does it handle Arabic, Indic and right to left text?

Yes, from version 1.1. Text goes through the Unicode bidirectional algorithm, Unicode normalization and an OpenType shaper, so Arabic letters join and take their contextual forms, the nine major Indic scripts reorder and form their conjuncts, and right to left text copies and searches in logical order. Thai, Khmer, Myanmar and Hangul shaping are on the roadmap.

## Can it create PDF/A files?

Yes, from version 1.1. Saving with PdfSaveOptions.Conformance writes PDF/A-1b, 2b, 2u, 3b, 3u, 4, 4e or 4f, after checking what cannot be repaired and listing every problem at once. PdfInvoice adds Factur-X and ZUGFeRD invoice data to PDF/A-3 files, and CI validates the output with veraPDF.

## Does it support long term signatures?

Yes, from version 1.1. PdfNetStack signs to PAdES B-B, B-T, B-LT and B-LTA, and validates signatures against the trust anchors you supply. It makes no network calls; your application sends the timestamp requests and supplies the revocation data.

## Can it make scanned PDFs searchable?

Yes, with the PdfNetStack.Ocr add-on, for Latin and Arabic script. It is a separate package on NuGet, with its models in PdfNetStack.Ocr.Models. The core library also has DrawInvisibleText to lay the words of any OCR engine over a scan.

## How much memory does it use?

The optimizer holds the whole document in memory. Plan for about 10 times the file size, more for image heavy files, or lower MaxDegreeOfParallelism to cap memory. From version 1.1, PdfDocument.OpenOnDemand reads and edits a file of any size page by page without loading it, and SaveIncremental appends only the changes.

## Can it write linearized PDFs for fast web view?

Yes, from version 1.1, with Linearize in PdfOptimizerOptions or pdfnetstack optimize --linearize. The output follows ISO 32000-1 Annex F with hint tables and is verified like any other rewrite.

## Is it safe to run on files from untrusted sources?

That is a design goal. Nesting depth, decoded stream sizes, image sizes and loops in the file structure are bounded, and damaged input raises PdfFormatException instead of crashing or hanging. The HTML converter fetches nothing from the network unless you give it a resource loader.

## Which version should I use today?

Version 1.2.0, on NuGet. It has every feature on this site, including the optimizer, editing, drawing, fonts, forms, signatures, PDF/A, extraction, HTML to PDF, OCR and the command line tools.

## Is PdfNetStack related to the PDFNet SDK?

No. PDFNet is a commercial SDK from Apryse. PdfNetStack is an independent open source project by JADEV with no connection to it.

## Who maintains PdfNetStack?

Jamal Abdelkhalek at JADEV created it and maintains it. Contributions are welcome under the contribution guide in the repository.

Source: https://www.jadev-corp.com/pdfnetstack/faq/
