Overwriting existing files
(mPDF ≥ 2.3)
Overwrite() function, an existing PDF file can be overwritten, replacing specified text with alternatives.
For example you may have created a long complex PDF file, and you wish to produce copies with an individual number on
each copy without having to re-generate the whole document each time.
SetImportUse() to enable pdf import functions.
OverWrite() was written to work on PDF files produced
by mPDF. It will work with encrypted files, as long as the same encryption properties are used for the new document.
I have also used it successfully with a number of external PDF files, including those produced by Acrobat Distiller
(but not if they are encrypted). It will not work with embedded font subsets.