Skip to content

Allow strict mode for PdfWriter #3494

@stefan6419846

Description

@stefan6419846

Explanation

PdfWriter currently does not support strict mode out of the box due to a missing __init__ parameter, although its base class PdfDocCommon defines the value. As there are some cases where a strict mode might make sense (like some error cases in clone_reader_document_root), it should be implemented directly as well.

Code Example

How would your feature be used? (Remove this if it is not applicable.)

from pypdf import PdfReader, PdfWriter

writer = PdfWriter(clone_from="test.pdf", strict=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    PdfWriterThe PdfWriter component is affected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions