Skip to content

Merge a list of PdfDocument objects into a single PdfDocument object #327

Closed Answered by mara004
hector-sherpas asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like gather_pages_to_unique_doc(), which triggers the error, might do OOB index access.
You're counting up idx_page without checking the document's length.
The pages argument of import_pages() is, of course, relative to the document being imported, so perhaps you always want the first page (index 0) instead of counting up?

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mara004

This comment was marked as off-topic.

@hector-sherpas
Comment options

@mara004
Comment options

Answer selected by mara004
@mara004
Comment options

@hector-sherpas
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