PDF to PDF Command Line Examples

This page contains various examples of using the PDF to PDF API in Command Line. The examples are complete and fully functional. Read more about how to convert PDF to PDF in Command Line.

Basic examples

Basic examples

Multiple PDFs to PDF file

pdf2pdf -user-name "demo" -api-key "ce544b6ea52a5621fb9d55f8b542d14d" \
    /path/to/cover.pdf \
    /path/to/proposal.pdf \
    /path/to/price.pdf \
    /path/to/contact.pdf > "offer.pdf"

Watermark a PDF file

pdf2pdf -user-name "demo" -api-key "ce544b6ea52a5621fb9d55f8b542d14d" \
    -page-watermark "/path/to/watermark.pdf" \
    /path/to/proposal.pdf > "company_offer.pdf"

Linearize a PDF file

pdf2pdf -user-name "demo" -api-key "ce544b6ea52a5621fb9d55f8b542d14d" \
    -linearize \
    /path/to/not_linearized.pdf > "linearized.pdf"