Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle foreignObject in svg to support html #7888

Merged
merged 6 commits into from
Nov 6, 2024

Conversation

tahmidrahman-dsi
Copy link
Collaborator

@tahmidrahman-dsi tahmidrahman-dsi commented Nov 4, 2024

This change handles html wrapped in foreignObject in svg certificate.

Sample usage:

<foreignObject x="187" y="178.488" width="384" height="473">
        <div xmlns="http://www.w3.org/1999/xhtml" style="margin-top: 0">
            <p style="font-family: 'Plus Jakarta Sans';
                text-align: justify;
                font-size: 14px;
                letter-spacing: 0em;
                margin-top: 0">
            Sample text in p  tag
            </p>
        </div>
    </foreignObject>

Note: to make styles effective, they have to be implemented in-line and use limited supported CSS properties (See docs)

This comment has been minimized.

@@ -66,6 +67,7 @@
"graphql-tools": "^4.0.7",
"handlebars": "^4.7.6",
"history": "^4.7.2",
"html-to-pdfmake": "^2.5.13",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to be a fairly lightweight dependency, should be fine for bundle size👍

@ocrvs-bot
Copy link
Collaborator

Your environment is deployed to https://html-support-in-certificate-pdf.opencrvs.dev

@tahmidrahman-dsi tahmidrahman-dsi marked this pull request as ready for review November 5, 2024 11:23
@tahmidrahman-dsi tahmidrahman-dsi added this to the v1.6.0 milestone Nov 5, 2024
@tahmidrahman-dsi tahmidrahman-dsi merged commit 15f8905 into develop Nov 6, 2024
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants