jsPDF icon indicating copy to clipboard operation
jsPDF copied to clipboard

Unable to export Material Icons to PDF

Open MaximBalaganskiy opened this issue 2 years ago • 26 comments

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.

MaximBalaganskiy avatar May 23 '22 03:05 MaximBalaganskiy

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

SquatCub avatar May 30 '22 19:05 SquatCub

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

SquatCub avatar May 31 '22 04:05 SquatCub

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.

MaximBalaganskiy avatar May 31 '22 04:05 MaximBalaganskiy

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 avatar May 31 '22 17:05 LeLunZ

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

LeLunZ avatar May 31 '22 17:05 LeLunZ

any fix for this issue?

topwebtek7 avatar Jun 29 '22 18:06 topwebtek7

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)

LeLunZ avatar Jun 29 '22 19:06 LeLunZ

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.

github-actions[bot] avatar Sep 29 '22 02:09 github-actions[bot]

Still relevant

MaximBalaganskiy avatar Sep 29 '22 02:09 MaximBalaganskiy

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

tomnar avatar Dec 05 '22 14:12 tomnar

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.

github-actions[bot] avatar Mar 06 '23 02:03 github-actions[bot]

bump

MaximBalaganskiy avatar Mar 06 '23 02:03 MaximBalaganskiy

Same problem with Font Awesome Icons 🔢

Intevel avatar Mar 17 '23 09:03 Intevel

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.

github-actions[bot] avatar Jun 16 '23 02:06 github-actions[bot]

Bump

MaximBalaganskiy avatar Jun 16 '23 03:06 MaximBalaganskiy

Still seeing this problem in 2.5.1

robertsummitt avatar Jul 25 '23 02:07 robertsummitt

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.

github-actions[bot] avatar Oct 24 '23 01:10 github-actions[bot]

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: @.***>

MaximBalaganskiy avatar Oct 24 '23 01:10 MaximBalaganskiy

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

jguirimm avatar Nov 26 '23 13:11 jguirimm

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.

github-actions[bot] avatar Feb 25 '24 01:02 github-actions[bot]

Bump

MaximBalaganskiy avatar Feb 25 '24 01:02 MaximBalaganskiy

lol bump bump

LanderBeeuwsaert avatar Feb 25 '24 01:02 LanderBeeuwsaert

bump

franss22 avatar May 07 '24 17:05 franss22

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>

iniceice88 avatar Jun 09 '24 17:06 iniceice88