const pdf = new jsPDF({
unit: 'in', // Set the unit to inches
format: 'letter' // 'letter' format is 8.5 x 11 inches
});
const x = 1;
const y = 1;
const width = 4;
const height = 2;
pdf.setFillColor(0, 0, 0);
pdf.rect(x, y, width, height);
Rectangle has a black background when pdf is set on a unit of inches. I want it just blank rectangle with a thin black outline, can’t change it into a different unit because most of my work depends on inches unit. When it is created in a pdf, it turns into a box overlapped in black background.
Jerry Duron is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.