PDF to PDF HTTP POST Examples

This page contains various examples of using the PDF to PDF API via HTTP POST. The examples are complete and fully functional. Read more about how to convert PDF to PDF via HTTP POST.

Basic examples
PDF manipulation examples

Basic examples

Multiple PDFs to PDF file

curl -f -u "demo:ce544b6ea52a5621fb9d55f8b542d14d" \
    -o "offer.pdf" \
    -F "input_format=pdf" \
    -F "f_1=@/path/to/cover.pdf" \
    -F "f_2=@/path/to/proposal.pdf" \
    -F "f_3=@/path/to/price.pdf" \
    -F "f_4=@/path/to/contact.pdf" \
    https://api.pdfcrowd.com/convert/20.10/

Watermark a PDF file

curl -f -u "demo:ce544b6ea52a5621fb9d55f8b542d14d" \
    -o "company_offer.pdf" \
    -F "input_format=pdf" \
    -F "page_watermark=@/path/to/watermark.pdf" \
    -F "f_1=@/path/to/proposal.pdf" \
    https://api.pdfcrowd.com/convert/20.10/

Linearize a PDF file

curl -f -u "demo:ce544b6ea52a5621fb9d55f8b542d14d" \
    -o "linearized.pdf" \
    -F "input_format=pdf" \
    -F "linearize=true" \
    -F "f_1=@/path/to/not_linearized.pdf" \
    https://api.pdfcrowd.com/convert/20.10/

PDF manipulation examples

Extract page 3 and all pages from 7 to the end from the PDF file

curl -f -u "demo:ce544b6ea52a5621fb9d55f8b542d14d" \
    -o "output.pdf" \
    -F "input_format=pdf" \
    -F "action=extract" \
    -F "page_range=3,7-" \
    -F "f_1=@/your-path-to/pdfs/13_pages.pdf" \
    https://api.pdfcrowd.com/convert/20.10/

Delete the first 3 pages and the 10th page from the PDF file

curl -f -u "demo:ce544b6ea52a5621fb9d55f8b542d14d" \
    -o "output.pdf" \
    -F "input_format=pdf" \
    -F "action=delete" \
    -F "page_range=1-3,10" \
    -F "f_1=@/your-path-to/pdfs/13_pages.pdf" \
    https://api.pdfcrowd.com/convert/20.10/