You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to embed custom fonts.
The docx-file ist generated at the client browser.
Please consider following example:
// create document0import{Document,Packer}from"docx";// base64 encoded demo/assets/Pacifico.ttf (Insert by yourself since it would burst this comment.)constfont=atob('...');constdoc=newDocument({sections: [],fonts: [{name: 'Pacifico',data: font}],// this is the error causing line});Packer.toBlob(doc).then((blob)=>{leta=document.createElement('a');a.href=window.URL.createObjectURL(blob);a.download='example.docx';a.click();});
I get following error message for index.mjs:18833:
Uncaught (in promise) TypeError: bytesToObfuscate.map is not a function
Is there any way to embed custom fonts for client side use?
Your help will be very much appreciated.
Robert
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to embed custom fonts.
The docx-file ist generated at the client browser.
Please consider following example:
I get following error message for
index.mjs:18833
:Is there any way to embed custom fonts for client side use?
Your help will be very much appreciated.
Robert
The text was updated successfully, but these errors were encountered: