Invalid Units
bpasham opened this issue · 4 comments
bpasham commented
while using this in an iFrame (sandboxed) receiving error - Invalid units
it's on line number 3415 (call originated line # 14020) in the jspdf.debug.js
(i am using debug file to get the line numbers)
Any help is appreciated.
HackbrettXXX commented
You are probably calling the jsPDF constructor wrong. The unit
parameter you pass to jsPDF is wrong. You can either call it with regular arguments:
new jsPDF('p', 'pt', [width, height])
or with an option object
new jsPDF({
orientation: 'p',
unit: 'pt',
format: [widht, height]
})
Valid units are pt, mm, cm, in, px, pc, em, ex.
bpasham commented
HackbrettXXX commented
Does this only occur when executed in an iframe? Could you provide a minimal repro? Could you also test if this issue also occurs with the original jsPDF version?
HackbrettXXX commented
Closing because of inactivity. Reopen if this is still an issue.