Augument TCPDFBarcode classes with ability to return raw png image data
PHP class for PDF
Brought to you by:
nicolaasuni
Updates the TCPDFBarcode and TCPDF2DBarcode classes to allow for fetching the rendered image as is, but separating the logic in the getBarcodePNG() methods into two functions, one sending http headers and echoing the image data, and the new method getBarcodePNGData() which just returns the image data.
Also worth noting is that the documentation of the getBarcodePNG() method is wrong, because it currently states that the function will return the image data, rather than output it.
Note: i attempted to extend the code so that existing users should be unaffected
OK. Fixed in TCPDF 6.0.080.
Thank you for reporting this issue.