I hope you do not have a library full of similar PDF's to process. This scanned document does not lend itself to an automated extraction process. However, there can be some improvements made and each page exported to a separate jpg as required.
The 29 page PDF supplied took 10 minutes to process. To do a better job will require each page to be checked and modified individually and I am guessing that is not what you want to do.
The work flow went like this
Open the PDF. I checked the actual embedded images and they are small jpgs. My feeling is not much point importing at 300 ppi , I used 150 ppi.
The overall readability of the pages can be improved using a plug-in gmic_gimp_qt from http://www.gmic.eu There is a version compiled for Debian. Once installed in Gimp, open gmic and look for the Repair scanned images filter.
The pages are all different sizes / angles / offsets. Try and find a sensible 'window' that fits best. Set some guides up for that 'window'
For multi-layer manipulation, hold the shift key down to toggle layer visibility and links on / off
I rotated the whole layer stack a very small amount.
One over large layer I scaled down
One small layer I scaled up.
The whole image I cropped to the size of the 'window'
Exporting the layers as individual jpegs. If using the latest Debian, Gimp might not have python support, so the attachment is a script-fu. Unzip and put in ~/.config/GIMP/2.10/scripts.
That gives File -> Export Layers put in your export location / filename.jpg to get numbered files.
It took me about 10 minutes for that but then I know my way around Gimp.
As a video - not viewed - deleted
best of luck
The 29 page PDF supplied took 10 minutes to process. To do a better job will require each page to be checked and modified individually and I am guessing that is not what you want to do.
The work flow went like this
Open the PDF. I checked the actual embedded images and they are small jpgs. My feeling is not much point importing at 300 ppi , I used 150 ppi.
The overall readability of the pages can be improved using a plug-in gmic_gimp_qt from http://www.gmic.eu There is a version compiled for Debian. Once installed in Gimp, open gmic and look for the Repair scanned images filter.
The pages are all different sizes / angles / offsets. Try and find a sensible 'window' that fits best. Set some guides up for that 'window'
For multi-layer manipulation, hold the shift key down to toggle layer visibility and links on / off
I rotated the whole layer stack a very small amount.
One over large layer I scaled down
One small layer I scaled up.
The whole image I cropped to the size of the 'window'
Exporting the layers as individual jpegs. If using the latest Debian, Gimp might not have python support, so the attachment is a script-fu. Unzip and put in ~/.config/GIMP/2.10/scripts.
That gives File -> Export Layers put in your export location / filename.jpg to get numbered files.
It took me about 10 minutes for that but then I know my way around Gimp.
As a video - not viewed - deleted
best of luck