Copy link to clipboard
Copied
I'm driving myself crazy trying to figure out a good way to drop a QR code into an existing PDF. I don't want to create a form, I simply want to add a QR code containing the file name into a print PDF (which has been generated from an imposition program that for some reason can't add one in itself). The QR code would be read by a scanner on a cutting machine.
I would be happy to use a plug-in if I could find one that just did what I wanted without a lot of other fancy stuff that I'd never use, and that would cost me an arm and a leg. Any advice would be appreciated, and if there's a better place to ask the question, let me know.
Well, Acrobat has a built-in Barcode form field that can be set to display QR codes with a dynamic value. However, that value can't be changed in Reader, unless a very special right is applied to the file. So if you only need a static code then that could be the solution for you.
Copy link to clipboard
Copied
Generate an image file that has the QR code in it, and then just add it to the PDF, like you would any other file.
Copy link to clipboard
Copied
Yes, that is the only way I can do this now. It would get very tedious to do that to a hundred files.
Copy link to clipboard
Copied
Well, Acrobat has a built-in Barcode form field that can be set to display QR codes with a dynamic value. However, that value can't be changed in Reader, unless a very special right is applied to the file. So if you only need a static code then that could be the solution for you.
Copy link to clipboard
Copied
I'm not using reader. Adding a form field isn't going to work for me as it's meant for a user to type in a value by filling in the form. Am I wrong about that? All I want to do is add a static QR code that has that PDF's file name, which would print. I could go up a really steep learning curve and figure out how to script it, which is what I'll do next if I don't find a simpler solution.
I am super annoyed that my imposition program can't do it. So annoyed that I'm looking at other imposition solutions (if the higher-ups will consider that).
Copy link to clipboard
Copied
The simplest solution is to create a text field that contains the field name (using a very simply script) and then use the value of that field in the calculation of the QR field. Alternatively, you can do it directly, but that would require a more complex script.
Copy link to clipboard
Copied
The very special right that needs to be applied; what would that be?
Thank you
Copy link to clipboard
Copied
It's done using an application called "Adobe LiveCycle Rights Management", I believe.
Copy link to clipboard
Copied
You would need to ask Adobe about the specific Right, or Reader Extenstion. But it won't be cheap. Most people find these "Rights" to be out of range.
Copy link to clipboard
Copied
Drag a "Text Field" and name it "WebsiteURL". You may change the name but you need to update the script accordingly. Very simple but important.
Then generate a Barcode and open the properties. Under the "Options" tab select the "QR code" from the "Symbology" menu. Then move to the Value tab and paste the script below by selecting "Custom calculation script", then click "Edit". After this, the QR Code will be regenerated every time you enter a link to the text field.
// Get the value from the WebsiteURL text field
var website = this.getField("WebsiteURL").valueAsString;
// Check if the website field is not empty
if (website !== "") {
// Ensure the URL starts with http:// or https://
if (!/^https?:\/\//i.test(website)) {
website = "https://" + website;
}
// Set the QR code value to the website URL
event.value = website;
} else {
// If the website field is empty, clear the QR code
event.value = "";
}
Copy link to clipboard
Copied
Thank you, gurbey_6134!!