id = "pdfcpu" name = "pdfcpu" homepage = "https://pdfcpu.io/" description = "PDF processor written in Go." executables = ["pdfcpu"] [dotfiles] # https://pdfcpu.io/config/config_list/ — pdfcpu creates config.yml in its # platform config directory; its documented macOS path is ~/Library/ # Application Support/pdfcpu and its XDG Unix spelling is ~/.config/pdfcpu. paths = [ "[appData]/pdfcpu/config.yml", "[configHome]/pdfcpu/config.yml", ] secret = [] [commands] format = 1 label = "pdfcpu" description = "Merge PDF files or split one into several. Other pdfcpu commands are not covered." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand]] path = ["merge"] label = "Merge PDFs" description = "Concatenate two or more PDFs into one output file." [[commands.subcommand.source]] id = "merge-doc" kind = "manual" url = "https://pdfcpu.io/core/merge" revision = "2026-10-27" evidence = """ pdfcpu merge outFile inFile... [flags] outFilePDF output file, use - to write to stdout inFile…at least 2 PDF input files subject to concatenation, use - for one stdin input in create mode $ pdfcpu merge --bookmark-mode preserve book.pdf chapter1.pdf chapter2.pdf $ pdfcpu merge --mode append -divider out.pdf in1.pdf in2.pdf in3.pdf $ pdfcpu merge --mode zip out.pdf a.pdf b.pdf m(ode)create, append, zipcreateno bookmark-modewrap, preservewrapno """ [[commands.subcommand.field]] id = "out_file" label = "Output PDF" type = "path" path = { kind = "file", role = "output" } position = 0 sources = ["merge-doc"] [[commands.subcommand.field]] id = "in_files" label = "Input PDFs" type = "path" path = { kind = "file", role = "input" } position = 1 multiple = true sources = ["merge-doc"] [[commands.subcommand.field]] id = "mode" label = "Merge mode" type = "enum" option = ["--mode"] choices = [{ value = "create", label = "Create" }, { value = "append", label = "Append" }, { value = "zip", label = "Zip" }] sources = ["merge-doc"] [[commands.subcommand.field]] id = "bookmark_mode" label = "Bookmark mode" type = "enum" option = ["--bookmark-mode"] choices = [{ value = "wrap", label = "Wrap per input file" }, { value = "preserve", label = "Preserve input bookmarks" }] sources = ["merge-doc"] [[commands.subcommand.task]] id = "merge" label = "Merge files" fields = ["out_file", "in_files"] required = ["out_file", "in_files"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["out_file", "in_files", "mode", "bookmark_mode"] [[commands.subcommand]] path = ["split"] label = "Split a PDF" description = "Write pieces of one PDF into an output directory." [[commands.subcommand.source]] id = "split-doc" kind = "manual" url = "https://pdfcpu.io/core/split" revision = "2026-10-27" evidence = """ pdfcpu split inFile outDir [ span | pageNr... ] [flags] $ pdfcpu split test.pdf out -m bookmark $ pdfcpu split -m page test.pdf out 2 4 10 m(ode)nospanSplit into PDF files with span pages each (default). bookmarkSplit into PDF files representing sections defined by existing bookmarks. pageSplit before specific page number(s). """ [[commands.subcommand.field]] id = "in_file" label = "Input PDF" type = "path" path = { kind = "file", role = "input" } position = 0 sources = ["split-doc"] [[commands.subcommand.field]] id = "out_dir" label = "Output directory" type = "path" path = { kind = "directory", role = "output" } position = 1 sources = ["split-doc"] [[commands.subcommand.field]] id = "mode" label = "Split mode" type = "enum" option = ["-m"] choices = [{ value = "span", label = "Every N pages" }, { value = "bookmark", label = "By bookmark" }, { value = "page", label = "Before page numbers" }] sources = ["split-doc"] [[commands.subcommand.field]] id = "span_or_pages" label = "Span or page numbers" description = "One span in span mode, or page numbers in page mode." type = "string" position = 2 multiple = true sources = ["split-doc"] [[commands.subcommand.task]] id = "split" label = "Split by span" fields = ["in_file", "out_dir", "mode", "span_or_pages"] required = ["in_file", "out_dir"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["in_file", "out_dir", "mode", "span_or_pages"]