View Single Post
Old 09-06-2019, 01:02 AM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Tex2002ans View Post
Code:
magick.exe -density 300 input.pdf[0-30] -trim .\output-%d.png
Side Note: Not sure why it's only cropping vertically, there's probably another method to crop the left/right whitespace too. It would probably speed up the later steps too.
Actually, I just figured it out. For this specific set of images, if you add another -trim, it cuts the left/right as well:

Code:
magick.exe -density 300 input.pdf[0-30] -trim -trim .\output-%d.png
And with the double-trimmed images, about 30 pages turned completely black in Step 2, so to get around that, I added a white border. This Step 1 is much better:

Code:
magick.exe -density 300 input.pdf[0-30] -trim -bordercolor white -border 40x40 .\output-%d.png
Tex2002ans is offline   Reply With Quote