๐ŸŒ Linearized (Fast Web View)

Optimized PDFs that display the first page immediately while the rest downloads in the background.

C# โ€” Linearized PDF
var doc = new PdfDocument();

// Enable linearization (Fast Web View)
// Reorders internal objects so the first page
// can render before the full file downloads.
// Ideal for PDFs served over HTTP.
doc.Linearize = true;

// Build the document as usual...
doc.Info.Title = "Linearized PDF";
doc.Language = "en-US";
doc.DisplayDocTitle = true;
var root = doc.EnableTaggedPdf();

// Add multiple pages
for (int i = 1; i <= 5; i++)
{
    var sect = root.AddChild(StructureType.Sect);
    var h1 = sect.AddChild(StructureType.H1);
    var p = sect.AddChild(StructureType.P);

    var page = doc.AddPage();
    page.AddTaggedText(h1, $"Page {i}", 72, 720,
        new PdfTextOptions {
            Font = StandardFont.HelveticaBold,
            FontSize = 20
        });
    page.AddTaggedText(p,
        "Linearized PDFs display this page " +
        "instantly while the rest downloads.",
        72, 690);

    page.AddArtifactText($"Page {i} of 5",
        270, 30, PdfArtifactType.Pagination);
}

doc.Save("linearized.pdf");
Illustration showing a browser with a PDF loading progressively: Page 1 is fully rendered and readable while a progress bar shows the remaining 4 pages downloading in the background โ€” demonstrating the Fast Web View capability of linearized PDFs

You should see three pages each with a bold "Page N" heading and a paragraph explaining linearized fast web view. In Adobe Acrobat or a browser PDF viewer, open Document Properties โ†’ Description and confirm "Fast Web View: Yes". The visible content is identical to a non-linearized PDF โ€” only the internal byte layout differs.
File: 19_linearized.pdf

โ™ฟ Accessibility Note

Linearization does not affect accessibility or tagged structure. The structure tree and all accessibility metadata remain intact โ€” only the byte ordering within the file changes for faster HTTP delivery.

When to Use Linearization

ScenarioRecommended
PDF served from a web serverโœ… Yes โ€” users see page 1 immediately
PDF downloaded then openedโšช Optional โ€” no visible benefit
PDF embedded in an <iframe>โœ… Yes โ€” improves perceived performance
Single-page PDFโšช No benefit โ€” only one page to load