Skip to content

The text fields inside SVG image render badly #1156

@RBerenguer

Description

@RBerenguer

I found this bug

Trying to put my SVG image in the pdf, I saw that does not render good enough.
This is the image I try to insert into the pdf:

Screenshot 2020-01-20 at 18 04 18

And this is the result in pdf:
Screenshot 2020-01-20 at 18 08 34

The difference are in the texts: in the original are in white around the circle and in the pdf are all in the center in black.

This is mPDF and PHP version

mPDF version: 8.0
PHP version: 7.2

This is a PHP code snippet I use

Once I have the html I use writeHTML function to print, and I use output method to return the pdf as string.

        $html = $this->twig->render(self::TEMPLATE_PDF, $twigContext);
        $this->pdf->WriteHTML($html);
        $output = $this->pdf->Output('', 'S');

This is a HTML/CSS code snippet I use

In the Twig file I use this line to insert the image:

<img src="https://thealchemistatelier.com/formula-images/?id=9661cae2-a8ad-4fe1-bc6d-e12b953cd7c3&type=iris&version=b758f9&w=350"/>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions