-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Bug Report
Description of the problem
On version 0.14.0 (and lower?), when you add an image, the Y position of the document is automatically updated.
So if we add another image, with moveDown or not, it will be below the first (same with the text, etc...).
But now in version 0.15.0, Y position is not updated after adding an image, so when we add another element (image or text), it is on top of the first one.
So there is a bug/regression in the new version 0.15.0.
Code sample
const doc = new PDFDocument({ layout: 'portrait', size: 'A4' });
doc.image(path.join(assetsPath, '/test1.jpg'), { width: 250 });
doc.moveDown(5);
doc.image(path.join(assetsPath, '/test2.jpg'), { width: 250 });
doc.end();Here is the result of the sample code in 0.14.0 :
And here the result in 0.15.0 :
Your environment
- pdfkit version: 0.15.0
- Node version: 20
- Browser version (if applicable):
- Operating System: MacOS
NormandoHall, BracketJohn, Shengael, sepiaflux, gavinr-maps and 8 more
Metadata
Metadata
Assignees
Labels
No labels

