Replies: 2 comments 6 replies
-
Hi @mara004 👋 Always a pleasure to see you around here :)
What do you think? You'd like to open a PR or do you prefer that we take care of this? Take care! |
Beta Was this translation helpful? Give feedback.
5 replies
-
FYI, I just received a user report confirming this problem: pypdfium2-team/pypdfium2#141 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Re-reading the code in
io/pdf.py
, I've got a performance question concerning your implementation.You're rendering multiple PDF pages using pypdfium2's concurrent
PdfDocument.render_topil()
method. However, instead of yielding the results incrementally, you accumulate all pixmaps in a list and return that. This has the following disadvantages:So unless you actually need to have all pages available at the same time, this should be changed to
and code that uses
read_pdf()
may need to be adapted to assume an iterator rather than a list. For instance,DocumentFile.read_pdf()
would need to doyield from read_pdf(...)
instead ofreturn read_pdf(...)
Beta Was this translation helpful? Give feedback.
All reactions