View Single Post
Old 04-29-2020, 02:37 PM   #4
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 207
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
Since, unlike Poppler, the Windows version of MuPDF is up to date, I'm giving mutool as try.

Unless I missed it, the only way to turn pages of a PDF into pictures is to a) split the file into individual PDF files (one page = one PDF), b) turn the PDF into a PNG, c) turn the PNG into a PDF, and then d) merge all the PDF files back into a single file.

1. For some reason, the 40KB PNG turns into a 2MB PDF:

#212 dpi, 768x1024
mutool draw -r 212 -w 768 -h 1024 -o 30.png input.pdf 30

#From 40KB to 2MB!
mutool draw -o 30.pdf 30.png

2. Is there a way to crop the pictures, as way to get rid of the borders?

Thank you.

--
Edit: Found it.

Code:
mutool convert -O compress -o 30.pdf 30.png
Attached Thumbnails
Click image for larger version

Name:	30.png
Views:	136
Size:	24.0 KB
ID:	178918  

Last edited by Shohreh; 04-29-2020 at 03:20 PM.
Shohreh is offline   Reply With Quote