TCPDF
TCPDF copied to clipboard
SVG detection fix for inline data images
Fixes: #645
Thank you! It's important to sign the CLA Can you add an example in examples/ folder that illustrates what you fix with this fix?
i signed the CLA but i have no idea about any examples to add - it just fixes the detection of the image Filetype from "nothing" to "svg"
i signed the CLA but i have no idea about any examples to add
Thanks
Can you add Fixes: #645
to your PR description ?
it just fixes the detection of the image Filetype from "nothing" to "svg"
Yeah okay, how can I test it and see how you fix fixes something ?
If for example you have SVG files laying around and want to add the SVG to the HTML Code using
$svgString = file_get_contents('yourdesired.svg');
or alternatively the <svg...> data is coming from a database, you can prepare and add it to the html string like this:
$html = '<img src="@' . base64_encode($svgString) . ' width="13mm" height="13mm">';
Later on you add the html to the PDF using e.g. ->writeHTML.
Without my fix the following ( Font Awesome Arrow-Down Icon) will be broken because it is not detected as SVG Image:
<img src="@PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzODQgNTEyIiB3aWR0aD0iNG1tIiBoZWlnaHQ9IjRtbSI+PHBhdGggZD0iTTM3NC42IDMxMC42bC0xNjAgMTYwQzIwOC40IDQ3Ni45IDIwMC4yIDQ4MCAxOTIgNDgwcy0xNi4zOC0zLjEyNS0yMi42Mi05LjM3NWwtMTYwLTE2MGMtMTIuNS0xMi41LTEyLjUtMzIuNzUgMC00NS4yNXMzMi43NS0xMi41IDQ1LjI1IDBMMTYwIDM3MC44VjY0YzAtMTcuNjkgMTQuMzMtMzEuMSAzMS4xLTMxLjFTMjI0IDQ2LjMxIDIyNCA2NHYzMDYuOGwxMDUuNC0xMDUuNGMxMi41LTEyLjUgMzIuNzUtMTIuNSA0NS4yNSAwUzM4Ny4xIDI5OC4xIDM3NC42IDMxMC42eiIgZmlsbD0iIzAwM2Y3MCI+PC9wYXRoPjwvc3ZnPg==" width="13mm" height="13mm">
any updates? did i miss something?
any updates? did i miss something?
Still on my todo list, this is not my project I only give some help to ensure this project continues to live So I need to test your work at some point
If you can write an example file in examples/ folder For example use example 66 (composer) as a base example. That would definitely help
@nicolaasuni what do you think about this fix ?
Please try to resolve the conflicts.