yWorks / jsPDF

JavaScript PDF generation to work with SVG
MIT License
56 stars 23 forks source link

Limit usage of embedded fonts to current used ones #29

Closed ThomasJunk closed 4 years ago

ThomasJunk commented 4 years ago

Hey guys,

MrRio JSDPF has an option putOnlyUsedFonts which limits the embedding of fonts to the actually used ones, which results in smaller PDFs - a goodie on Mobile with bad connection.

See: https://github.com/MrRio/jsPDF/blob/6c6ca0c4554eb5b6446dab9337befd6625119bee/src/jspdf.js#L86

Are there any current plans retrofitting this functionality into this fork?

I am asking only for planning purposes. If there is a foreseeable timeframe I would wait for it.

OTOH I could live without - so no actual pressure.

HackbrettXXX commented 4 years ago

Still the wrong project? ^^

ThomasJunk commented 4 years ago

Still the wrong project? ^^

Hopefully not. This is the jsPDF-fork, right?

(It's friday of a long week :D)

HackbrettXXX commented 4 years ago

Yes, this is the yWorks fork of jsPDF.

The feature you are referencing was already merged some time ago into this fork. So it should work. If not, this is a bug.

ThomasJunk commented 4 years ago

Oh. Okay. I was lazy, using only https://github.com/yWorks/jsPDF/search?q=putOnlyUsedFonts&unscoped_q=putOnlyUsedFonts which currently shows this thread but not the code.

ThomasJunk commented 4 years ago

Okay. Looking at the source code, STRG+F finds it 3(. I'll close here. Github's search is strange.