maxpmaxp / pdfreader

Python API for PDF documents
MIT License
113 stars 26 forks source link

SimpleCanvas.copy converts images dictionary to list #63

Closed viking closed 3 years ago

viking commented 3 years ago

See https://github.com/maxpmaxp/pdfreader/blob/42444158babe3dc474412c4c8639a875b1f4effe/pdfreader/viewer/canvas.py#L44

If images is an empty dictionary, it gets converted to an empty list.

viking commented 3 years ago

Actually, this isn't just happening for empty dictionaries. It happens whenever using CanvasIterator.

viking commented 3 years ago

Converting the images dictionary to a list throws away the dictionary values and only keeps the keys.

maxpmaxp commented 3 years ago

@viking fixed on master. Feel free submitting PRs next time :-)