I'm using the master branch of jsPDF in an iOS browser. My initialization is:
const doc = new jsPDF({
unit: 'in',
format: [5.5, 8.5],
precision: 10,
putOnlyUsedFonts: true
})
doc.setFontSize(20)
I want the PDF to mimic the text elements in my HTML which use px units. setFontSize() accepts parameters as pt values right? So if my HTML text element is 20px in css, what do I send to setFontSize()? Is the original global unit setting in the constructor have anything to do with the setFontSize() method? I find that multiplying my css px value by ~1.6-1.7 gets the generated PDF to better match font sizing in my HTML. So if my html text element has font-size: 20px, I call doc.setFontSize(33) But that was just me constantly changing the multiply factor and eyeing the result. I'm trying to find an exact method.
Does the device PPI/DPI factor in? The dimensions of my HTML container element? The dimensions of the PDF page?

