Hello, I have a though problem. I want to generate a QR Code in a CFDocument PDF. But it seems that I cant use any JavaScript in it. Is it possible to use Javascript in a CFDocument PDF? If you want i can show you the code too if its necessary :)
a
aliaspooryorik
10/13/2022, 9:05 AM
You won't be able to use Javascript in a PDF file to generate the QR Code. You can create the QR code as an image and embed the image in the document though.
If you can generate the file and save it to a base64 image string then pass it into a
imagewriteBase64()
it in your pdf that should do the trick.
f
foundeo
10/14/2022, 2:40 PM
If you use cfhtmltopdf tag it does support some javascript, but using the java library might be a more resilient solution long term - good idea to use base64 encoded image as well.