Skip to content
Discussion options

You must be logged in to vote

Given the traceback in your PR, this is related to keeping the links working by copying them over from the source document to the destination document. As they might be split across multiple pages which are only added to the writer later, this is done during the writing process itself.

If you use

def test_writer_does_not_hold_references_to_reader_files():
    writer = PdfWriter(clone_from=RESOURCE_ROOT / "example.pdf")    
    with NamedTemporaryFile() as output_file:
        writer.write(output_file)  # throws exception

there is no such problem and might be more suitable for most use cases.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by thomasuster
Comment options

You must be logged in to vote
2 replies
@stefan6419846
Comment options

@thomasuster
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants