Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:pdf [2011/04/20 11:50]
cyril [Xournal]
software:pdf [2014/10/20 08:41] (current)
cyril [pdfjam]
Line 15: Line 15:
 ===== PDFTK ===== ===== PDFTK =====
  
-Split and merge PDF files: +  * Split and merge PDF files:<code>
-<code>+
 pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
 pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
 +pdftk A=one.pdf B=two.pdf cat A1 B1W output combined.pdf # rotate West B1 (E,N,W,S)
 +pdftk one.pdf two.pdf shuffle output combined.pdf # shuffle the two files (A1 B1 A2 B2 A3 B3...)
 </code> </code>
- +  * Encrypt/decrypt, set permissions, repair:
-Encrypt/decrypt, set permissions, repair:+
 [[http://www.accesspdf.com/article.php/20041129175231241]] [[http://www.accesspdf.com/article.php/20041129175231241]]
 +
 +===== pdfjam =====
 +
 +  * split and merge:<code>
 +pdfjam file1.pdf '-' file2.pdf '1,2' file3.pdf '2-' --outfile output.pdf
 +</code>
 +  * set multiple pages in one:<code>
 +pdfjam --nup 2x1 --landscape true --frame false file.pdf
 +</code>
 +  * quickly rotate (pdf90, pdf180, pdf270):<code>
 +pdf90 file1.pdf
 +</code>
 +
 +===== sed =====
 +
 +  * crop pages (here remove 14% of page height at the bottom):<code>
 +sed 's/MediaBox \[0 0 612 1008*/MediaBox \[0 145 612 1008]/g'<in.pdf >out.pdf
 +</code>/!\ some tools such as pdftk or gs may consider the file as corrupted afterwards
  
 ===== convert (image magick) ===== ===== convert (image magick) =====
Line 29: Line 47:
 <code> <code>
 convert page-*.png -page A4 [-rotate 90] test.pdf convert page-*.png -page A4 [-rotate 90] test.pdf
 +convert -density 300x300 test.png test.pdf
 +convert -units PixelsPerInch -density 300x300 -extent 2480x3508 -gravity center -background white test.png test.pdf
 </code> </code>
  
 +Convert pdf page into image file at resolution 300dpi:
 +<code>
 +convert -density 300x300 test.pdf test.png
 +</code>
 ===== pdftotext ===== ===== pdftotext =====
  
software/pdf.1303300219.txt.gz · Last modified: 2013/09/19 16:43 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0