pymupdf / PyMuPDF-Utilities

Demos, examples and utilities using PyMuPDF
GNU Affero General Public License v3.0
566 stars 153 forks source link

Docs/embedded list #70

Closed programarivm closed 1 year ago

programarivm commented 1 year ago

Removed the desc info because of the following error.

python list.py input.pdf
Traceback (most recent call last):
  File "list.py", line 52, in <module>
    char_repl(info["desc"]),
KeyError: 'desc'

So this is how the list is printed now.

python list.py input.pdf
---------------------------------------------------------------------------------------------------------------
Name                                         Filename                                         Length       Size
---------------------------------------------------------------------------------------------------------------
joe-caione-qO-PIF84Vxg-unsplash.jpg          joe-caione-qO-PIF84Vxg-unsplash.jpg             1738526    1749092
erik-jan-leusink-s2mkB4WOl9k-unsplash.jpg    erik-jan-leusink-s2mkB4WOl9k-unsplash.jpg       1215151    1219212
---------------------------------------------------------------------------------------------------------------
2 embedded files in 'input.pdf'. Totals:
File lengths: 2953677, compressed: 2968304, ratio: 100.5% (savings: -0.5%).
---------------------------------------------------------------------------------------------------------------

Also on this occasion renamed variables and removed self-explanatory comments.

JorjMcKie commented 1 year ago

👍👏