parallax / jsPDF

Client-side JavaScript PDF generation for everyone.
https://parall.ax/products/jspdf
MIT License
29.35k stars 4.68k forks source link

Unable to export Material Icons to PDF #3423

Open MaximBalaganskiy opened 2 years ago

MaximBalaganskiy commented 2 years ago

I have read and understood the contribution guidelines.

Material Icons are not exported to PDF. The fiddle to reproduce https://jsfiddle.net/qjt1y5ac/1/ I have also tried the font converter with the same result.

SquatCub commented 2 years ago

Could you please assign me the issue, I think I have a solution for it

SquatCub commented 2 years ago

Have you used any other font for other icons apart from material icons?

MaximBalaganskiy commented 2 years ago

I have tried font-awesome with no luck - some unicode glyphs are rendered instead of the icons. Proper text random font from google fonts collection worked fine.

LeLunZ commented 2 years ago

Having the same issue :) Rendered html looks like this: Screen Shot 2022-05-31 at 19 36 19

PDF Looks like this (arrows missing): Screen Shot 2022-05-31 at 19 37 14

Here the pdf for debugging: not-working.pdf

LeLunZ commented 2 years ago

@SquatCub what would you suggestion is the fix/not working?

topwebtek7 commented 2 years ago

any fix for this issue?

LeLunZ commented 2 years ago

any fix for this issue?

Not really. In the fontFace property you can add this:


               {
                    family: 'Material Icons',
                    src: [
                        {
                            url: 'assets/fonts/MaterialIcons-Regular.ttf',
                            format: 'truetype',
                        },
                    ],
                }, ```

but it will show blank icons (nothing)
github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

MaximBalaganskiy commented 2 years ago

Still relevant

tomnar commented 1 year ago

Does this mean that jsPDF cannot be used for websites that use Material Icons? I cannot get the icons to show up :/

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

MaximBalaganskiy commented 1 year ago

bump

Intevel commented 1 year ago

Same problem with Font Awesome Icons 🔢

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

MaximBalaganskiy commented 1 year ago

Bump

robertsummitt commented 1 year ago

Still seeing this problem in 2.5.1

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

MaximBalaganskiy commented 1 year ago

Bump

On Tue, 24 Oct 2023 at 12:47 pm, github-actions[bot] < @.***> wrote:

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

— Reply to this email directly, view it on GitHub https://github.com/parallax/jsPDF/issues/3423#issuecomment-1776336806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4KNPCKQH7LCCFYMV5IKFTYA4M45AVCNFSM5WUM2WF2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGYZTGNRYGA3A . You are receiving this because you authored the thread.Message ID: @.***>

jguirimm commented 11 months ago

Bonjour, je souhaite participer à la résolution de ce problème. Pouvez-vous me l'attribuer ?

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

MaximBalaganskiy commented 8 months ago

Bump

LanderBeeuwsaert commented 8 months ago

lol bump bump

franss22 commented 6 months ago

bump

iniceice88 commented 5 months ago

As a workaround, you can use the codepoint instead of the text 'check'. MaterialIcons-Regular.codepoints

https://jsfiddle.net/35zL1htq/

<div style="width: 21cm;" id="page">
    Icon
    <span style="font-family: 'Material Icons'; font-size: 24px">&#xe5ca;</span>
</div>
github-actions[bot] commented 2 months ago

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

LeLunZ commented 2 months ago

Bump