pdfcpu

Logo

PDF tooling for Go and the command line.

View the Project on GitHub pdfcpu/pdfcpu


Changelog
Future Directions

Set Page Layout

This command configures the page layout that shall be used when the document is opened.

Have a look at some examples.

Usage

pdfcpu pagelayout set inFile value [ outFile ] [flags]

Common Flags


Arguments

namedescriptionrequired
inFilePDF input file, use - to read from stdinyes
valuepage layout modeyes
outFilePDF output file, use - to write to stdoutno

Page Layouts

namedescription
SinglePageDisplay one page at a time (default)
TwoColumnLeftDisplay the pages in two columns, with odd-numbered pages on the left
TwoColumnRightDisplay the pages in two columns, with odd-numbered pages on the right
TwoPageLeftDisplay the pages two at a time, with odd-numbered pages on the left
TwoPageRightDisplay the pages two at a time, with odd-numbered pages on the right

Examples

Set page layout for test.pdf (case agnostic):

$ pdfcpu pagelayout set test.pdf TwoColumnLeft
$ pdfcpu pagelayout list test.pdf
TwoColumnLeft

Set page layout while reading and writing the PDF through pipes:

$ aws s3 cp s3://acme-publishing/ebook.pdf - \
   | pdfcpu pagelayout set - TwoPageLeft - \
   | aws s3 cp - s3://acme-publishing/ebook-spreads.pdf