pdf

Contents

    See also: poppler-utils

    Booklet creation

    Using bookletimposer (GUI and CLI)

    Converts in.pdf into a booklet with two pages per sheet an saves the result as out.pdf
    bookletimposer --no-gui --booklet --pages-per-sheet=2x1 --output=out.pdf in.pdf

    Converts the two-pages-per-sheet booklet in.pdf into a page-by-page PDF
    bookletimposer --no-gui --linearise --pages-per-sheet=2x1 in.pdf
    As the output file name is not defined, it will default to in-conv.pdf.

    Using pdfbook2 (CLI only)

    pdfbook2 input.pdf → generates input-book.pdf

    Using jPdf tweek (GUI only)

    Old Java program, which still does it job well.

    Multiple pages per output page (for economical printing)

    Using bookletimposer

    Using pdfjam

    With page numbering

    pdfjam \
      --preamble "\RequirePackage[a4paper,top=2cm,left=2cm,right=2cm,bottom=2cm]{geometry} \usepackage{fancyhdr} \renewcommand{\headrulewidth}{0pt} \pagestyle{fancy} \cfoot{\thepage}" \
      --pagecommand "{}" \
      --suffix multi \
      --nup 2x2 \
      --frame true \
      --delta "0.5cm 0.5cm" \
      --a4paper --landscape \
      --scale 0.93 \
      file1.png file2.png
    

    Remove password protection

    qpdf --password=mySecret --decrypt input.pdf output.pdf

    Multiple pages per output page (for notes taking)

    Using pdfjam

    Using pdfxup

    One file per page

    qpdf --split-pages input.pdf output-%d.pdf

    Subset of pages

    Using qpdf

    qpdf input.pdf --pages . 1-10 -- output.pdf

    Using pdfjam (only portrait with this example)

    Using pdfseparate (one page per pdf)

    Pages reordered

    qpdf input.pdf --pages . 10,9,8,7,6,5,4,3,2,1 -- output.pdf

    File concatenation

    Using pdfunite

    pdf → text

    images → pdf

    See ImageMagick page.

    Other solution: img2pdf input1.png input2.png -o output.pdf

    pdf → images

    See ImageMagick page.

    Images extraction from a pdf file

    As jpeg images : pdfimages -j file.pdf img-dir/
    As png images : pdfimages -png file.pdf img-dir/

    Office document → pdf (using Libre Office)

    Package: libreoffice-writer
    lowriter --convert-to pdf filename.doc
    lowriter --convert-to pdf filename.docx

    Proudly Powered by Zim 0.75.2.

    Template by Etienne Gandrille, based on ZeroFiveEight and using JQuery Toc Plugin.