r/learnpython • • Oct 07 '26

PDF pages to PNG's in python

I have a relatively large pdf document (100+mb) of pages i need saved as png's. There are online tools to do that but they refuse to work with files that big, plus I can imagine needing that tool again later in the future. Are there any python libraries that allow to convert one format into the other? Preferrably with little to no compression.

4 Upvotes

12 comments sorted by

View all comments

7

u/[deleted] Oct 07 '26

[removed] — view removed comment

2

u/ee_control_z Oct 07 '26

Yes, I was thinking the exact same thing. The OP can make use of Python generators to sequence the conversion in chunks versus all at once. Here is a tutorial on the subject on how it can potentially be done by way of the libraries mentioned:

https://www.geeksforgeeks.org/python/generators-in-python/