pyaota.util.bundle module¶
Bundle PDF documents from a directory into uniform-sized bundles.
Optionally generates a “co-bundle” consisting of the last page of each input document concatenated into a single PDF.
- pyaota.util.bundle.bundle_pdfs(input_dir, output_dir, bundle_size, co_bundle=False)[source]¶
Bundle all PDFs in input_dir into new PDF files, each containing bundle_size documents concatenated in sorted order.
- Parameters:
input_dir (
Path) – Directory to scan for*.pdffiles.output_dir (
Path) – Directory where bundle PDFs (and optional co-bundle) are written.bundle_size (
int) – Number of source documents per bundle.co_bundle (
bool) – If True, also produce a PDF that concatenates the last page of every source document.
- Returns:
0 on success, 1 on error.
- Return type: