PDF and QR Code - HELP

Hey Guys

I am having trouble adding a QR code to a PDF document.
I have sucessfully added one to a Grid application using the same code as below with minor modifications, but when using it on a PDF I get an undefined offset error on each of the variables.
I have tried the below on “onScriptinit” and “onRecord” , both of which give me the error…

// QR Code Data
$Fname = {mbr.mbrFname};
$Lname = {mbr.mbrLname};
$valid = {mbr.mbrValid};
$date = {mbr.mbrDateValid};
// Merge all relevant QR fields
$barcode = “$Fname” . “$Lname” . “$valid” . “$date”;
// QR Output
{qr_barcode} = $barcode;

For the grid application (where its working) the only difference is the fields instead of {mbr.mbrFname} we have {mbrFname} which is working fine. Of course I am selecting multiple tables for the PDF cards.

HELP pls… really want to add a QR code to these cards!

after logout and back in again seems that this is now working fine. weird, V8 seems to need a log-out every so often…