VBA code for simple modification of PDF files (read in, combine, write out)
This repository provides a minimal PDF (Portable Document Format) reading and writing set of routines in pure VBA - no external libraries required. Note: included Dictionary.cls can be removed and a reference to Microsoft.Scripting.Dictionary can be used instead. [Future versions may switch to using memory copy routines, deflate, and other support provided by imported libraries from Cristian Buse's MIT licensed code.] This is a much less complete tool using only VBA similar to better tools such as qpdf. This does not support displaying PDF documents and currently there is no support for extracting text (a future version will support minimal text extraction but there is no intention to support OCR nor NNs to extract text from images or complex formating).
/TODO/ See Tests and Main modules for example usage
Currently the targeted PDF files are those generated by Microsoft's Print to PDF printer and linearized documents generated by saving an existing PDF using Adobe's Acrobate Reader. There is much not yet implemented, but all the basic structures and values of a pdf are supported with limited Filter support for stream objects (currently only DEFLATE optionally with PNG UP).
To enable self contained PDF support, uses VBA replacement Dictionary object. As basic inflation for zlib (DEFLATE) compression is needed, also provides a copy of the basic support for reading in files from ZIP archives from ExcelZip.
See original source for updates and bugfixes: https://github.com/cristianbuse
This repository imports MIT licensed code, see license and copyright in respective source files. The remaining source is licensed U.S. Public Domain or CC0 equivalent - thus distributed versions are collectively MIT licensed.