Created
February 18, 2020 11:30
-
-
Save igorbrigadir/09ac67b8a3dc617c58b5f7609b3fa7ed to your computer and use it in GitHub Desktop.
Printing Booklet Papers with pdfbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Parse file name (can sometimes break with strange names but works with most) | |
| FILE="$(basename $1 .pdf)" | |
| # Bookletize | |
| pdfbook $FILE".pdf" | |
| # Launch pdf viewer of your choice to preview and print | |
| evince $FILE"-book.pdf" | |
| # Remove temporarily created files after veiwer is closed | |
| rm $FILE"-book.pdf" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Parse file name (can sometimes break with strange names but works with most) | |
| FILE="$(basename $1 .pdf)" | |
| # Trim white space: left bottom right top | |
| pdfjam --trim '1.5cm 1.5cm 1.5cm 1.5cm' --clip true $FILE".pdf" --outfile $FILE"trim.pdf" | |
| # Bookletize | |
| pdfbook $FILE"trim.pdf" | |
| # Launch pdf viewer of your choice to preview and print | |
| evince $FILE"trim-book.pdf" | |
| # Remove temporarily created files after veiwer is closed | |
| rm $FILE"trim-book.pdf" | |
| rm $FILE"trim.pdf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment