Hello,
I need to include QR Code in PDF generated with Prince. The information to be encoded is present in HTML as an data-* attribute.
I tried to achieve it with a Javascript library (like this one http://d-project.googlecode.com/svn/trunk/misc/qrcode/js/) - unfortunately it turned out to be extremely slow. When run in the browser, the script takes around 20ms to generate a QRCode, but when run in Prince it takes about 6-7s (!). I tried many other libraries, as well as going for Datamatrix instead of QRCode (which is in theory faster to generate) but never been able to get times shorter than 2s.
Any ideas why it takes so long to calculate a QRCode using Prince? What Javascript engine are you using?
Also, I would appreciate any other idea for generating a QRCode inside a PDF document.
I know one could simply do:
I need to include QR Code in PDF generated with Prince. The information to be encoded is present in HTML as an data-* attribute.
I tried to achieve it with a Javascript library (like this one http://d-project.googlecode.com/svn/trunk/misc/qrcode/js/) - unfortunately it turned out to be extremely slow. When run in the browser, the script takes around 20ms to generate a QRCode, but when run in Prince it takes about 6-7s (!). I tried many other libraries, as well as going for Datamatrix instead of QRCode (which is in theory faster to generate) but never been able to get times shorter than 2s.
Any ideas why it takes so long to calculate a QRCode using Prince? What Javascript engine are you using?
Also, I would appreciate any other idea for generating a QRCode inside a PDF document.
I know one could simply do:
<img src="qrcode.php?code=1234567890">
but in my case it is not possible.