Skip to content

V7: This dictionary cannot be used anymore, because its content is now owned by an object of a derived class #369

@TomasMadajevas

Description

@TomasMadajevas

V7-alpha fails with System.InvalidOperationException: 'This dictionary cannot be used anymore, because its content is now owned by an object of a derived class.' when attempting to merge one document into another:

using var source = PdfReader.Open("./with_newline_whitespace_in_indirect_object_numbers.pdf", PdfDocumentOpenMode.Import);
using var destination = new PdfDocument();

foreach (var page in source.Pages)
{
    destination.AddPage(page);
}

File taken from pdf-lib (just found repro, happens with real life files too):
with_newline_whitespace_in_indirect_object_numbers.pdf.

This does work with 6.2.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions