Commit graph

10 commits

Author SHA1 Message Date
Nico Weber
4bb29e6ac4 pdf: Add a --debugging-stats flag
Tries to render all pages of a PDF and then produces a report on which
unimplemented things were encountered.

Example, for pdf_reference_1-7.pdf:

    113 times: Rendering of feature not supported: Type0 font not imp...
        on pages: 170 (3x) 217 (2x) 250 (9x) 252 (2x) 329 (6x)...
    21 times: Rendering of feature not supported: unknown color space
        on pages: 489 (4x) 490 (5x) 491 (3x) 492 (5x) 493 (4x)
    4 times: Rendering of feature not supported: CCITTFaxDecode Filte...
        on pages: 494 (4x)

(Actually, rendering crashes for some page in that file at the moment.
This was with a local change to only render the first 800 pages to work
around that. So this is also good for finding crashes.)
2023-07-24 11:00:01 -04:00
Nico Weber
e78ea08ed9 pdf: Make --dump-contents print all objects referenced by page too 2023-07-13 20:29:58 +02:00
Nico Weber
62013f2008 pdf: Minorly tweak a help text 2023-07-13 04:53:59 +02:00
Nico Weber
52ff180ed4 pdf: Add --dump-contents flag
This dumps the /Content stream of a page, which is possibly useful for
debugging.
2023-07-12 18:22:35 -04:00
Nico Weber
16c1a6a447 pdf: Alphabetize options 2023-07-12 18:22:35 -04:00
Nico Weber
c3f78d9561 pdf: Add function to render a page of a PDF to a bitmap
Use like so:

    Build/lagom/bin/pdf --render foo.png --page=50 path/to.pdf
2023-07-12 07:54:28 +01:00
Nico Weber
c781686198 pdf: Add a --password option for encrypted PDFs 2023-07-12 06:28:15 +02:00
Nico Weber
f418605ec7 pdf: Print PDF version; tweak output 2023-07-11 13:49:17 -04:00
Nico Weber
c8e0db5061 pdf: Print info dict metadata if present 2023-07-10 17:49:07 +01:00
Nico Weber
efad31dac1 Utilities: Add a pdf utility
This utility will learn tricks such as extracting images from PDFs and
dumping tables from PDFs so that we can create code from specs.

It also allows testing LibPDF things in lagom, and allows testing
reading large amounts of PDFs using a shell script.
2023-07-04 06:50:15 +02:00