Jim is right.
To get what you need, assuming a variable of InvoiceNumber defined as global in the document, I would do the following:
I'd probably build my barcode string into a variable in a PressTalk object just before the barcode object so that I have control over it and don't have to mess about in the small string field in the object properties.
Define a global variable (type: string) in the document structure called
BarcodeStringPressTalk code
define(&PageNumber, string, inttostr(¤t.printpage))
define(&TotalPages, string, GetMeta('SelectedPageCount[0]', 1, 'Job.Group.Document'))
&BarcodeString := inttostr(&InvoiceNumber) + &PageNumber + &TotalPages
Then in your barcode object, just set the barcode string to:
&BarcodeString and this should do it.
NB: This presupposes that you have a simple document boundary setup and aren't using a user-defined emulation.Hope this helps.
Best,
James.