Closed MatheusrdSantos closed 1 month ago
Fix drawRectangle to handle rotation correctly
to fix the issue reported here: https://github.com/cantoo-scribe/pdf-lib/issues/61
const fs = require('fs'); const pdf = require('@cantoo/pdf-lib'); run(); async function run() { const doc = await pdf.PDFDocument.create(); const page = doc.addPage(); page.drawRectangle({x: 20, y: 200, width: 100, height: 50, rotate: pdf.degrees(45)}); fs.writeFileSync('bugreport.pdf', await doc.save()); }
before(left) and after(right)
What?
Fix drawRectangle to handle rotation correctly
Why?
to fix the issue reported here: https://github.com/cantoo-scribe/pdf-lib/issues/61
How?
Testing?
New Dependencies?
Screenshots
before(left) and after(right)