Skip to content

Pdf splitting/stacking #170

Closed Answered by mara004
PasaOpasen asked this question in Q&A
Jan 28, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Yes. You can create new pdfs and import pages from foreign pdfs. Thereby you can split/merge pdfs and move pages programmatically.

However, main doesn't have a helper method for that yet, so I suggest that you take a look at the devel-new branch, which provides PdfDocument.import_pages():

def import_pages(self, pdf, pages=None, index=None):
"""
Import pages from a foreign document.
Parameters:
pdf (PdfDocument):
The document from which to import pages.
pages (list[int] | str | None):
The pages to include. It may either be a list of zero-based page indices, o…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@PasaOpasen
Comment options

@PasaOpasen
Comment options

@mara004
Comment options

@mara004
Comment options

Answer selected by PasaOpasen
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