The first scenario: with strokeWidth, a 0.1 scale is applied, and the rect generated in the PDF will not gradient. Without scaling, it will gradient;
The second scenario: without strokeWidth, there will be a gradient with or without scaling;
So is there a conflict between scaling and strokeWidth?
SUCCESS
FAILURE
What did you expect to happen?
In the case of both scaling and strokeWidth, I want the rect generated in the PDF to gradient. Thank you.
What were you trying to do?
Hello, I would like to have rect (with strokeWidth) gradient in the generated PDF after scaling.
How did you attempt to do it?
const express = require('express'); const Canvas = require('canvas'); const fs = require('fs'); const { PDFDocument }= require('pdf-lib');
const app = express() app.listen(8080,()=>{ console.log('running in http://127.0.0.1:8080') })
app.get('/test',async(req,res) => { const file = "./"+Math.random()+".pdf"
})
What actually happened?
The first scenario: with strokeWidth, a 0.1 scale is applied, and the rect generated in the PDF will not gradient. Without scaling, it will gradient; The second scenario: without strokeWidth, there will be a gradient with or without scaling; So is there a conflict between scaling and strokeWidth? SUCCESS FAILURE
What did you expect to happen?
In the case of both scaling and strokeWidth, I want the rect generated in the PDF to gradient. Thank you.
How can we reproduce the issue?
Examples are as follows
Version
1.17.1
What environment are you running pdf-lib in?
Node
Checklist
Additional Notes
Thank you.