Skip to content

Commit

Permalink
fix the transform behavior of addPage function
Browse files Browse the repository at this point in the history
  • Loading branch information
RingoTC committed Oct 18, 2023
1 parent 4ec77dd commit 3307563
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ class PDFDocument extends stream.Readable {

// flip PDF coordinate system so that the origin is in
// the top left rather than the bottom left
this._ctm = [1, 0, 0, 1, 0, 0];

this.transform(1, 0, 0, -1, 0, this.page.height);

this._ctm = [1, 0, 0, 1, 0, 0];

this.emit('pageAdded');

return this;
Expand Down

0 comments on commit 3307563

Please sign in to comment.