PDF

From Indie IT Wiki
Revision as of 16:20, 4 March 2020 by imported>Plittlefield
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Annotate PDF files

sudo apt-get install xournal
xournal /path/to/your/file.pdf

Thanks

Reduce SIZE of PDF File

sudo apt-get install ghostscript 
ps2pdf LARGE.pdf SMALL.pdf

Don't know how it works but it does, just reduced a 9Mb PDF to 1Mb and it looks fine :-)

Thanks - https://www.shellhacks.com/linux-compress-pdf-reduce-pdf-size/

Rotate Landscape to Portrait in Windows

Problem: You want the printed 'landscape' page to be shown in 'portrait' on screen.

Solution: Print it twice.

  1. Word > Page in Landscape > Print to PDF
  2. Adobe Reader > Open File > View > Rotate Clockwise > Print to PDF

Extract Text From PDF File

pdftotext pdffilename.pdf textfilename.txt

Removing PDF Passwords

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf -c .setpdfwrite -f in.pdf

The PDF Toolkit For Linux

http://packages.ubuntu.com/trusty/pdftk

sudo aptitude install pdftk

HOWTO: Join Several Pages Together Into One PDF

pdftk file1.pdf file2.pdf file3.pdf cat output newfile.pdf

HOWTO: Extract A Single Page From One PDF

pdftk ~/path/to/big.pdf cat 1 output /tmp/page1.pdf

HOWTO: Extract A Few Pages From One PDF

pdftk ~/path/to/big.pdf cat 9-11 output /tmp/pages.pdf

HOWTO: Extract All Pages Individually From One PDF

pdftk ~/path/to/big.pdf burst

HOWTO: Extract Pages From An Encrypted Document

Open the PDF with GIMP and you will be presented with the following window:

Gimp import from pdf.png

Click on the page you wish to extract and click the 'Import' button:

Gimp import from pdf select.png

You will now be able to save the page as a PDF with a new file name.

NOTE: This has only been shown to work on Linux but there is no reason to expect it would not work on other platforms.