montage -geometry +0+0 -tile 10x *.jpg result.jpg
creates a montage of all the jpgs in the folder, 10 images wide (you can't specify by how many height.
https://stackoverflow.com/questions/37709879/how-to-generate-a-collage-image-like-shown
montage -geometry +0+0 -tile 10x *.jpg result.jpg
creates a montage of all the jpgs in the folder, 10 images wide (you can't specify by how many height.
https://stackoverflow.com/questions/37709879/how-to-generate-a-collage-image-like-shown
Lighten those pages
(using rm to add security permissions then remove them after https://stackoverflow.com/questions/52861946/imagemagick-not-authorized-to-convert-pdf-to-an-image)
sudo mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.off
-----When done, you can restore the original with
sudo mv /etc/ImageMagick-6/policy.xml.off /etc/ImageMagick-6/policy.xml
3 step process:
(change the level value)
With the arg -threshold you get a "black and white" (only) image. But I want to keep the gray scale, which is possible with the arg -level: you keep the gray, letting the image with a darker or lighter gray scale. (referring to something like <<< convert output*.jpg -normalize -threshold 80% final-%02d.jpg >>>
install qpdf (FOSS)
qpdf originalDoc.pdf --pages . 1-10 -- outputDoc.pdf
For multiple sets of pages
qpdf --pages . 1-8 . 53-70 -- input.pdf output.pdf
(There is a way described for Imagemagick but it didn't work for me https://linuxhint.com/convert-image-to-pdf-command-line/ )
sudo apt-get install img2pdf
Open a Terminal in the folder with the images and do
sudo img2pdf *.png -o output_imgs.pdf
(assuming the images are pngs.)
sudo apt install tesseract-ocr
or (although I don't think this is necessary)
sudo apt install tesseract-ocr libtesseract-dev tesseract-ocr-eng
Do an example. Name your file existingimage.png and open a Terminal in that folder and do
tesseract -l eng existingimage.png output_from_ocr cat documenttocreate.txt
(where -l specifies a language. To see all the languages, do man tesseract)
OCR means Optical Character Recognition
Convert image to pdf (not to txt)
tesseract -l eng input_for_ocr.png output_from_ocr pdf
Errors because 'Tesseract couldn't load any languages!': https://github.com/tesseract-ocr/tesseract/issues/1309
Spanish: download from here https://github.com/tesseract-ocr/tessdata/blob/c2b2e0df86272ce11be323f23f96cf656565ed41/spa.traineddata
put it here /usr/share/tesseract-ocr/4.00/tessdata/eng.traineddata (You will have to open that folder as root)
Or maybe you can just use: sudo apt-get install tesseract-ocr-spa (although it might not save it to the location you want)
NOTE: After you install a language (or even if you don't) you might over-save the same file, and see an error message, but it's working anyway.