Describe the proposed feature
There are circumstances where it would be desirable to forcibly alter the output image to be a certain type or undergo additional processing. For example, if an input PDF is simply a bunch of scanned PNGs, I would like to be able to:
- Set a lower output resolution/DPI. Scanning at a higher resolution for OCR won't need quite as many pixels for the final product.
- Force grayscale, in case the input came in as color, but color can be dropped.
- Include support for libimagequant for further lossy compression that retains high visual quality.
- Force output to be JPEG2000 or JBIG2. These are in many cases better for certain inputs. Despite the docs and help text suggesting that
--optimize 3 --jbig2-lossy should be able to output a JBIG2-encoded PDF, I have not had any success there if the input PDF is comprised of grayscale PNGs.
- The next PDF revision will support JPEG-XL. It may be worth thinking ahead regarding adding support for due to its many advantages.
Describe the proposed feature
There are circumstances where it would be desirable to forcibly alter the output image to be a certain type or undergo additional processing. For example, if an input PDF is simply a bunch of scanned PNGs, I would like to be able to:
--optimize 3 --jbig2-lossyshould be able to output a JBIG2-encoded PDF, I have not had any success there if the input PDF is comprised of grayscale PNGs.