NetPdf

Live previewer

Design documents without the save-and-open loop

A desktop window that shows your document as you write the code that produces it. Swap .Save() for .ShowInPreviewer() and leave it running.

1. Install

terminal
dotnet tool install -g NetPdfKit.Previewer.App   # the netpdf-previewer window
dotnet add package NetPdfKit.Previewer           # adds ShowInPreviewer() to your project

2. Point your document at it

Program.cs
using NetPdf.Fluent;
using NetPdf.Previewer;

Document.Create(doc => doc
    .Page(page => page
        .Content(c => c.Text("Hello, previewer!"))))
    .ShowInPreviewer(); // instead of .Save()/.ToBytes() while designing

Re-renders on rebuild

Run under dotnet watch run. Each rebuild pushes the fresh PDF to the window, which launches itself on first use (default port 12500).

Errors stay contained

Generation exceptions appear in the window's error panel instead of killing the watch loop, so you fix and keep going.

Thumbnail sidebar

Continuous-scroll pages with a thumbnail rail for jumping around long documents.

Zoom, fit, and save

Zoom controls, fit-to-width, and a Save PDF button for grabbing the document you are looking at.

The previewer lives in the same repository as the library — browse the source.