Is it possible to feed TCPDF or FPDI PDFs as a string? I have an incoming array of PDFs as strings, and I can't write to disk. I wasn't able to find anything in the documentation about this.
If not, is there an efficient way to store/read these PDFs from memory or as objects? as to feed them to FPDI?
FPDI does not accept strings, but TCPDI, which I just released, has a setSourceData()
method in addition to FDPI's setSourceFile()
, as I happened to have the exact same requirement. TCPDI has its own parser (tcpdi_parser, based on TCPDF's parser) which supports PDFs above 1.4 without requiring the commercial addon for FPDI - which may also be of benefit when working with existing PDFs.