Skip to content

Reading and writing PDF file damages it #180

@6801318d8d

Description

@6801318d8d
#!/usr/bin/env python3

import typing
from borb.pdf import PDF, Document

doc: typing.Optional[Document] = None
with open("test.pdf", "rb") as pdf_file_handle:
    doc = PDF.loads(pdf_file_handle)
assert doc is not None
with open("test2.pdf", "wb") as pdf_file_handle:
    PDF.dumps(pdf_file_handle, doc)

test.pdf:
image

test2.pdf:
image

test.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions