Mobileread
PDF cropping software: BRISS
#321  j.p.s 02-20-2020, 03:10 PM
Quote nlundberg
@j.p.s

Thanks, I'll check that one out too. k2pdfopt did actually did what I asked for right away. Then, as always, you see a lot of interesting options and become greedy...
k2pdfopt is probably easier to use, especially if you don't have ghostscript installed, but croppdf might make a smaller file.
Reply 

#322  nlundberg 02-21-2020, 05:46 PM
After tons of tries with the command line trying to auto straighten, I had to give up. I could not find a way to cut out the black areas from the center of the book, since after the split from double page scans, the black area is alternating side throughout the document.
I tried some other options for cleaning up but the pages ended up with slightly different sizes and I couldn't figure out how to keep page sizes.

Would be fun to get it 100% right cosmetically but it is perfectly readable now.
Reply 

#323  willus 02-21-2020, 08:03 PM
Quote nlundberg
After tons of tries with the command line trying to auto straighten, I had to give up. I could not find a way to cut out the black areas from the center of the book, since after the split from double page scans, the black area is alternating side throughout the document.
I tried some other options for cleaning up but the pages ended up with slightly different sizes and I couldn't figure out how to keep page sizes.

Would be fun to get it 100% right cosmetically but it is perfectly readable now.
Can you post or PM me the source PDF? BTW, I would have recommended two passes. There is a way to skip the first two pages using the -cbox option rather than the -grid option. Or you could just use a tool like cpdf to grab only pages you want from individual PDFs.
Reply 

#324  nlundberg 02-22-2020, 05:59 PM
Quote willus
Can you post or PM me the source PDF? BTW, I would have recommended two passes. There is a way to skip the first two pages using the -cbox option rather than the -grid option. Or you could just use a tool like cpdf to grab only pages you want from individual PDFs.
Thanks, pm sent!
Reply 

#325  willus 02-23-2020, 04:16 PM
Quote nlundberg
Thanks, pm sent!
I used two passes:

k2pdfopt -mode crop -t -cbox1,2 0,0,1s,1s -cbox3- 0in,0in,7.186in,7.65in -cbox3- 7.186in,0in,6.18in,7.65in source.pdf -o out1.pdf

k2pdfopt -mode crop -t -ac -as -w 7in -h 8in out1.pdf -o out2.pdf

This forces the output page size to be 7 x 8 inches. If you are okay with variable page sizes, you can remove the -w and -h options from the second pass.
Reply 

#326  nlundberg 02-24-2020, 01:36 PM
Quote willus
I used two passes:

k2pdfopt -mode crop -t -cbox1,2 0,0,1s,1s -cbox3- 0in,0in,7.186in,7.65in -cbox3- 7.186in,0in,6.18in,7.65in source.pdf -o out1.pdf

k2pdfopt -mode crop -t -ac -as -w 7in -h 8in out1.pdf -o out2.pdf

This forces the output page size to be 7 x 8 inches. If you are okay with variable page sizes, you can remove the -w and -h options from the second pass.
Thanks, how should I do the two passes? Add the commands in one terminal session, or process quit, load out1.pdf and do 2nd pass?

I get this message on 2nd pass anyway:

Code
Reading 294 pages from out1.pdf ...
SOURCE PAGE 1 of 294 (3.7 x 4.3 in) ... 1 new page saved.
warning: premature end of data in flate filter
warning: ... repeated 2 times ...
warning: premature end of data in flate filter
warning: ... repeated 2 times ...
Then it goes idle after page 16. :/
Reply 

#327  willus 02-24-2020, 10:14 PM
Quote nlundberg
Thanks, how should I do the two passes? Add the commands in one terminal session, or process quit, load out1.pdf and do 2nd pass?

I get this message on 2nd pass anyway:

Code
Reading 294 pages from out1.pdf ...
SOURCE PAGE 1 of 294 (3.7 x 4.3 in) ... 1 new page saved.
warning: premature end of data in flate filter
warning: ... repeated 2 times ...
warning: premature end of data in flate filter warning: ... repeated 2 times ...
Then it goes idle after page 16. :/
It hangs processing page 17, which doesn't have any text anyway, so you can just skip that page. I adjusted the autocrop to be not quite as aggressive.


k2pdfopt -mode crop -t -ac .02 -as -w 7in -h 8in out1.pdf -o out2.pdf -px 17
Reply 

 « First  « Prev   (33/33)
Today's Posts | Search this Thread | Login | Register