I am looking for a tool to trim the margin of pdf files, to be more convenient to reading on my 10.0 inch tablet.
Briss do the work well. It's a java program, so jvm need to be installed beforehand.
Download it (briss-0.9.tar.gz) and extract, run it with java -jar briss-0.9.jar
,
or java -jar briss-0.9.jar <target.pdf>
, see README.txt for details.
After several tries, I found the right process is NOT open pdf directly with briss. The following is the recommended way:
First open the target pdf with evince <target.pdf>
, see if the margin area is the same.
If not, remember the special page numbers.
For example, the first 6 pages, including cover, copy right page, etc, are different with the remaining pages. When starting briss, input "1-6" when asked for "Enter pages to be excluded from merging". Briss open page 1 to 6 respectively, and put all odd and even pages into 2 other "clusters".
A cluster is group of pages share the same margin settings. So all odd pages use the same margin settings, and all even pages use same margin settings, (which may be different with the odd cluster).
Use mouse to set the rectange in each cluster, then [Action -> Preview], if it's ok, [Action -> Crop PDF].
For convenience, add the following codes into ~/.bash_aliases:
function briss(){
java -jar $HOME/apps/briss-0.9/briss-0.9.jar $1
}
So now crop pdf with briss <target.pdf>
.
If define alias with alias briss='java -jar $HOME/apps/briss-0.9/briss-0.9.jar'
, tab-completion doesn't work.
So here we use function.
I also tried pdfcrop, which is installed with sudo apt-get install texlive-extra-utils
.
After cropped, the page index information is lost.
And page size vary with the text area.
So it's not recommended.