Reputation: 323
I'm using tcpdf to generate PDF files with PHP and I have no problem embedding SVG images in the form of .svg files containing the XML markup that is representation of the image. However, I would like to be able to use that XML, for example as a PHP string, and supply it to tcpdf directly, without the need of storing it in a file.
Is this possible somehow?
Upvotes: 4
Views: 2498
Reputation: 323
I found the solution by checking the source code of tcpdf (and then I saw that it is actually in the documentation as well; I just missed it): instead of supplying a filename, it is possible to supply the XML string preceded by a @.
Upvotes: 7