Skip to content

PDFsharp loses content when reading PDFs with incremental updates #302

@KKatationer

Description

@KKatationer

When opening a PDF that was saved using incremental update (e.g., after adding images and saving incrementally), PDFsharp does not expose the latest revision, content added in the incremental update is missing and no exception is thrown.

Environment

PDFsharp version: 6.2.1
Target framework: .NET 9.0
OS: Windows 11 (x64)

Code Sample

using PdfSharp.Pdf.IO;

using var document = PdfReader.Open("example.pdf", PdfDocumentOpenMode.Modify);
document.Save("example_saved.pdf");

Files

example.pdf

Expected behavior

The painting in the upper left corner should be shown.

Actual behavior

The painting in the upper left corner is not shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions