I have many documents scanned in past with a printer that did not have a direct "to PDF" option, so I have various folders called "Document1, Document2." Within each of the folders were many jpg like 001.jpg, 002.jpg, 003.jpg, ..
I want to join them in a single PDF file. Modern printers just do the same incorporating a JPG "stream" encapsulated and shown one for each page.
I tried to do it with a simple image viewer by selecting all of them and printing in PDF. This caused a re-compression of all images again in JPG with several drawbacks:
- If I select a JPG quality too poor the image look super crappy and compressing something compressed will lead to Generation Loss.
- If I select a JPG very high quality near ~100% in order to prevent additional generation loss the filesize of the output PDF will be huge.
Here's what I am thinking:
Because the images stored in a PDF file are nothing more than JPG streams, isn't it possible to include original JPG files directly into a PDF container without recompressing them? This would be the best way to achieve NO LOSS and NO RECOMPRESSION!
In case, which software can I use in order to do so? There's something out of there like
ffmpeg for PDFs (my head go to
ffmpeg -c:v copy option to copy streams into a different container) ? Perhaps a parser of postscript to call directly, rendering a folder of jpg files and many command-line options?
It would be nice to find a command line software available for all operating systems. The software must, however, run under Windows.
EDIT: Aside the main question of a multi-platform software, I was trying to understand why Adobe Acrobat itself isn't able to do it. In the advanced settings dialog it seems be possible with the option: Save original JPEG images in PDF if possible
Probably the problem here is given by my image viewer program that resample and rehandle in some ways the JPGs instead giving them directly inside Adobe Acrobat Distiller.
Should I just drag & drop the files inside Acrobat Application ?