pdfcpu

Logo

A PDF processor written in Go.

View the Project on GitHub pdfcpu/pdfcpu


Changelog

Cut


Usage

pdfcpu cut description inFile outDir [ outFile ] [flags]

Flags

namedescriptionrequired
p(ages)selected pagesno

Common Flags


Arguments

namedescriptionrequired
descriptionconfiguration stringyes
inFilePDF input fileyes
outDiroutput directoryyes
outFileNamePDF output file nameno

Description

A configuration string to specify the cutlines.

parameterdescriptionvalues
horizontalhorizontal page cuts at height fraction (origin top left corner)eg: .25
verticalvertical page cuts at width fraction (origin top left corner)eg: .25 .5
marginmargin / glue area in display units>= 0.0
bgcolormargin / glue area color valuecolor
borderdraw content region border along set marginon/off, true/false, t/f

Examples

Apply a horizontal page cut at 0.25 height.
Results in a PDF containing 3 PDF pages for each processed page:

$ pdfcpu cut 'hor:.25' test.pdf .
cutting test.pdf into ./ ...
writing test_page_1.pdf




Apply a horizontal page cut at 0.25 height and a vertical page cut at 0.75 width.
Results in a PDF containing 5 pages for each processed page:

$ pdfcpu cut 'hor:.25, vert:.75' test.pdf .
cutting test.pdf into ./ ...
writing test_page_1.pdf




The following has the same effect as: pdfcpu ndown 3 in.pdf outDir:

$ pdfcpu cut 'hor:.33 .66' inFile outDir

The following has the same effect as: pdfcpu ndown 4 in.pdf outDir:

$ pdfcpu cut 'hor:.5, ver:.5' inFile outDir