Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 04-25-2010, 08:55 AM   #1
droople
Connoisseur
droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.
 
droople's Avatar
 
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
Any FREE software to crop PDF pages

Hi

I'm looking for a free software to crop PDF pages.

Any suggestions?

Thank you in advance.

Cheers
droople is offline   Reply With Quote
Old 04-25-2010, 03:00 PM   #2
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
It might help to know what Operating System you're on, and whether or not you'd be OK with a command line tool.

Anyway, sopdf does this, and more (though with the right settings you can get it only to crop). It's very fast too. Calibre, which has its own subforum here, comes with a command line tool for cropping PDFs which you can automate if you combine with ghostscript (also free).

I gave instructions for using these to do batch crops of an entire directory of PDFs here and here.

Linux also has a GUI-based program called pdfedit.
frabjous is offline   Reply With Quote
Advert
Old 04-25-2010, 03:35 PM   #3
WillAdams
Wizard
WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.
 
WillAdams's Avatar
 
Posts: 1,233
Karma: 3350652
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
pdftk and multivalent should be able to do this as well.

I usually use pdflatex to crop / tweak .pdfs --- one can also print to a .ps file w/ appropriate page setting and re-distill.
WillAdams is offline   Reply With Quote
Old 04-25-2010, 04:23 PM   #4
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Pdftk cannot crop pages as far as I know. If it can, please post the command here. I use pdftk for a lot of things, I've never heard of using for it cropping before.

How does printing to a .ps file help? Please be specific.

We are talking about cropping individual pages here, not removing a page range.
frabjous is offline   Reply With Quote
Old 04-25-2010, 05:12 PM   #5
WillAdams
Wizard
WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.
 
WillAdams's Avatar
 
Posts: 1,233
Karma: 3350652
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
Define a (custom) page size as desired.

Print the .pdf using said page size to a .ps file.

Distill to a pdf

Or use pdfcrop:

http://pdfcrop.sourceforge.net/

Or a script which uses pdftk:

#!/bin/bash

perl -pe "s/(Crop|Media)Box\s*\[(.+?)\]/\$1Box\[$2\]/g;" $1 | pdftk - output $3

(from http://konrad.familie-kieling.de/com...x/63-crop-pdfs )

Last edited by WillAdams; 04-25-2010 at 05:15 PM.
WillAdams is offline   Reply With Quote
Advert
Old 04-25-2010, 07:39 PM   #6
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
I use pdflatex to do things like this too, but I don't think pdflatex or perl/python scripts designed for linux are the answer for most users. (Unfortunately, it's not pdftk doing the cropping there, but perl...)

SoPDF is faster than any of those, and runs fine under windows with no dependencies, so that'd be my recommendation unless we've got a mac or linux user here.
frabjous is offline   Reply With Quote
Old 04-25-2010, 09:58 PM   #7
droople
Connoisseur
droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.
 
droople's Avatar
 
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
Quote:
Originally Posted by frabjous View Post
It might help to know what Operating System you're on, and whether or not you'd be OK with a command line tool.

Anyway, sopdf does this, and more (though with the right settings you can get it only to crop). It's very fast too. Calibre, which has its own subforum here, comes with a command line tool for cropping PDFs which you can automate if you combine with ghostscript (also free).

I gave instructions for using these to do batch crops of an entire directory of PDFs here and here.

Linux also has a GUI-based program called pdfedit.
Thank you frabjous

I'm using WinXP, I'm ok with command line if no other GUI software available.

I'm not sure how to crop pages without seeing the pages?
droople is offline   Reply With Quote
Old 04-25-2010, 10:11 PM   #8
greenapple
Evangelist
greenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enough
 
Posts: 404
Karma: 664
Join Date: Dec 2009
Device: Kindle Paperwhite, Kindle DX, Kobo Aura HD
Most PDF editors I know simply change the viewable portion by changing the margin. I haven't come across one that actually crops and discards the unwanted areas.
greenapple is offline   Reply With Quote
Old 04-25-2010, 10:30 PM   #9
droople
Connoisseur
droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.
 
droople's Avatar
 
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
Quote:
Originally Posted by greenapple View Post
Most PDF editors I know simply change the viewable portion by changing the margin. I haven't come across one that actually crops and discards the unwanted areas.
that's good enough for reading on the 6-inch screen
droople is offline   Reply With Quote
Old 04-25-2010, 11:17 PM   #10
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
Originally Posted by droople View Post
Thank you frabjous
I'm not sure how to crop pages without seeing the pages?
The programs I mentioned and linked to will automatically calculate the whitespace and remove all the whitespace possible. If all you're cutting out is whitespace, and you don't want to leave any behind, there shouldn't be an issue.

If you want to leave any whitespace there, or you want to crop out non-empty parts of the page, things get more complicated. I give some input on doing that with calibre's pdfmanipulate program in one of the threads I linked to, but without a GUI you just have to use trial and error, or measure what you need to crop.

SoPDF is a commandline program, but there are two simple GUI wrappers for it for windows. One I wrote, which you'll find you go far enough in the thread. Another Nathan Campos wrote, which you'll find if you search the forums here at Mobileread. His is nice because it shows any errors you get in the window, but mine has some other nice features (though I'm biased). (I don't personally use either, since I don't use Windows anymore.)

If I recall correctly it's the -m3 or "Fit Height" option that will only crop, not split the pages.

There are different levels of "leaving the rest behind" vs. cropping. Adobe Acrobat's cropping feature for example, just inserts a command for hiding portions of the page which is not respected by non-Adobe PDF viewers. The methods I've listed do better than that; they do genuinely resize the page. However, they don't fully remove elements that get cropped out if you're removing more than just whitespace; they just aren't shown. If all you're cropping is whitespace, however, there's no difference.

Last edited by frabjous; 04-25-2010 at 11:24 PM.
frabjous is offline   Reply With Quote
Old 04-26-2010, 02:11 AM   #11
ab7vf
Enthusiast
ab7vf has a complete set of Star Wars action figures.ab7vf has a complete set of Star Wars action figures.ab7vf has a complete set of Star Wars action figures.
 
Posts: 41
Karma: 296
Join Date: Sep 2009
Location: Pacific Northwest
Device: dxg and newfound Icarus 8
you might check out "papercrop"

(google is your friend)

Jim
ab7vf is offline   Reply With Quote
Old 04-26-2010, 03:07 AM   #12
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by frabjous View Post

There are different levels of "leaving the rest behind" vs. cropping. Adobe Acrobat's cropping feature for example, just inserts a command for hiding portions of the page which is not respected by non-Adobe PDF viewers. .
I had the oppportunity to use Adobe Acrobat 7 once. If you select the dedicated option for it, it is able to crop cleanly a pdf book, taking out all whitespace page by page (taking into account that some pages in the book can have a variable text content). It seems the end result is a really cropped pdf. Am I wrong?

This maybe would explain why the display time of this cropped file was soooooo long on my PRS-505.

Last edited by roger64; 04-26-2010 at 03:14 AM.
roger64 is offline   Reply With Quote
Old 04-26-2010, 03:11 AM   #13
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
mistake

Last edited by roger64; 04-26-2010 at 03:14 AM.
roger64 is offline   Reply With Quote
Old 04-26-2010, 08:26 AM   #14
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
Originally Posted by ab7vf View Post
you might check out "papercrop"
(google is your friend)
PaperCrop converts the PDF to a .gif sequence of images, which means you lose any ability to use search or dictionary functions with your PDF. It'll also radically increase the size of the file. Still it IS useful for many purposes, especially if you have a multi-column PDF you want to make readable on a 6" screen by splitting the columns.

Quote:
I had the oppportunity to use Adobe Acrobat 7 once. If you select the dedicated option for it, it is able to crop cleanly a pdf book, taking out all whitespace page by page (taking into account that some pages in the book can have a variable text content). It seems the end result is a really cropped pdf. Am I wrong?
I don't know. I do have a copy of Adobe Acrobat (> 7) but almost never use it; I was mainly going by what others say on these forums. I don't remember a "dedicated" option but perhaps didn't look hard enough.

The PDF reading firmware on the Sony is made by Adobe, so I don't think you could tell testing with it.
frabjous is offline   Reply With Quote
Old 04-26-2010, 09:06 AM   #15
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by frabjous View Post
I don't remember a "dedicated" option but perhaps didn't look hard enough.
Well, English is not my native language, as you strongly suspect. Let's try "a special tick-box for removing white space" (see the lower part of the attachment below, a screenshot from Acrobat 7)
Attached Thumbnails
Click image for larger version

Name:	acrobat.png
Views:	696
Size:	21.4 KB
ID:	50520  
roger64 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classic Split PDF pages into smaller pages (images into tiles) Astro Barnes & Noble NOOK 4 06-12-2020 10:56 AM
Other Non-Fiction Stallman, Richard M.: Free Software, Free Society, PDF v1.0, 4 March 2009 scottdw Other Books 1 12-15-2011 03:02 PM
Auto crop raster image PDF - any software? bthoven PDF 16 09-07-2010 02:55 PM
pdf crop linux x3oo PDF 2 03-08-2009 06:50 AM
Crop PDF. astra PDF 2 02-01-2009 04:03 PM


All times are GMT -4. The time now is 12:17 AM.


MobileRead.com is a privately owned, operated and funded community.