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
In V 0.16, an out of memory error occurs when a Japanese font is specified.
The following sample script outputs pdf correctly in V0.15, but an out of memory error occurs in V0.16.
Code sample
PDFDocument=require('pdfkit');fs=require('fs');//Create a documentdoc=newPDFDocument();doc.pipe(fs.createWriteStream('sample.pdf'));doc.font('./fonts/NotoSansJP-Regular.ttf')// set your favorite font.fontSize(30).text('これはSample PDFファイルです',50,10).end();
Error message (Only the beginning part)
<--- Last few GCs --->
[17565:0x128008000] 48595 ms: Scavenge (interleaved) 4089.5 (4099.1) -> 4088.0 (4103.6) MB, pooled: 0 MB, 9.42 / 0.00 ms (average mu = 0.265, current mu = 0.255) allocation failure;
[17565:0x128008000] 49581 ms: Mark-Compact (reduce) 4088.2 (4103.6) -> 4087.9 (4096.6) MB, pooled: 0 MB, 838.33 / 0.00 ms (+ 0.8 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 842 ms) (average mu = 0.233, cu
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
Your environment
pdfkit version: 0.16
Node version: v23.4.0
Operating System: macOS 14.6.1
The text was updated successfully, but these errors were encountered:
Bug Report
Description of the problem
In V 0.16, an out of memory error occurs when a Japanese font is specified.
The following sample script outputs pdf correctly in V0.15, but an out of memory error occurs in V0.16.
Code sample
Error message (Only the beginning part)
Your environment
The text was updated successfully, but these errors were encountered: