Rand Stats

PDF::Combiner

zef:tbrowder

Actions Status Actions Status Actions Status

NAME

PDF::Combiner - Provides routines and a program to combine and title PDF documents

SYNOPSIS

use PDF::Combiner;
combine-pdfs config=our-israel-tour.txt

Installation requirements

PDF::Combiner requires the system binary program, ps2pdf, in order to compress PDF files. To install it on a Debian system, execute:

sudo apt-get install ps2pdf

To compress any PDF execute:

ps2pdf -dPDFSETTINGS=/ebook large.pdf smaller.pdf # 150 dpi

ps2pdf -dPDFSETTINGS=/printer large.pdf smaller.pdf # 300 dpi

A 78 Mb combined PDF compressed to the following sizes:

I could not see any differences in one printed page, but your results may vary. Choose output file compresion on the command line. You may also set it in your project configuration file.

DESCRIPTION

PDF::Combiner is a simple but useful tool to combine PDF documents into a single PDF document.

In the example above, our-israel-tour.txt is a simple formatted text file containing several types of lines. See the example project config files in directory /example-project for usable examples of the input file.

Note the PDF files are expected to be in the same directory as the project file. If that is a problem for your use case, please file an issue.

config file

The configuration (or project) file is a typical text file with data in single-line format for most options or in blocks of text. Its suffix is not specified, but the example files have extensions of .txt (the author's preference). Options are entered in a format taken from Rakudoc: =option-name value.... or =begin option-name...=end option-name..

Blank lines are ignored (except in text blocks) and comments on a line begin at the first # character and continue to the end of the line.

Note comments in a text block resulting in a blank line will result in that blank line being retained in the block.

Options

Possible additional options

CREDITS

Thanks to prolific Raku module distribution author David Warring for his wonderful PDF project (https://github.com/pdf-raku) and especially for his example of how to combine PDF files into one.

AUTHOR

Tom Browder tbrowder@acm.org

COPYRIGHT AND LICENSE

© 2022-2023 Tom Browder

This library is free software; you may redistribute it or modify it under the Artistic License 2.0.