current page number into graphic barcode? (OMRMarkData PageIndex)

88 views
Skip to first unread message

cklee

unread,
Jan 8, 2020, 12:02:48 PM1/8/20
to XMPie Interest Group
I want to create a graphic barcode that encodes a string concatenated to the current page number ("this_1", "this_2", etc).

One method is to create one barcode ADOR for each page. This is crude, resulting in many ADORs (e.g. 10 for a 10-page template) and introducing room for error (manual placement of correct ADOR per page). But it works.

The more elegant method would be to create a barcode ADOR which contains a page number parameter such as the "Current Page Number" special marker that is available in INDD. But I can't make it work.

I've already found that this character works in a text ADOR after being pasted into the rule editor:

pasted adobe pg num.png



However, this doesn't work in a graphic ADOR, or at least not in conjunction with the XMPBarcode() QLingo function. The resulting barcode is visibly different:

try4 render result.png




In this image, top is desired result using 'crude' method, left is partial string and right is complete string. It looks like the 'complete' barcode is attempting to render "&" based on this decode result:

pasted adobe pg num decode.png



The yellow box is a PGE (EPS) that helped me understand the way /PageIndex (and /TotalPages) are available via OMRMarkData PostScript. Both the PGE and the barcode graphic are composed of PostScript, and I had hoped they could be used together for the desired effect. However, the PGE executes only during output composition whereas barcode previews are available during design. I'll try attaching my sample INDD and PGE.

So, is there any way to get the current page number into a graphic barcode ADOR?


Thanks,
--Chris
page number into barcode.zip

couch

unread,
Jan 9, 2020, 12:24:31 AM1/9/20
to XMPie Interest Group
You can't use the XMPie Barcode function to do this. It is because of a fundamental way the application works.

The barcode function is part of uPlan, so it only can encode data that is available at the time the plan is parsed.

The workflow of XMPie's print production is:

1) read one row of data from recipient database
2) parse the data through uPlan to get an evaluated set of ADOR values
3) pass the evaluated ADOR values into InDesign (or XLIM) for document composition...

So, assuming a variable number of pages due to visibility or auto-flowing text, you won't know the number of pages until step 3 - and that is after step 2 when the barcode is created.

PGE works because PostScript output is basically a computer language and the EPS can include code to calculate those values. This calculation is happening when the output file is being processed by the printer, so it is after document composition and therefore has the page count data available to use.

The only solution for you will be to use 2D barcode in the PGE as Igor describes here: https://groups.google.com/d/msg/xmpie-users/uluovirYMHQ/lmwu_vsRBwAJ

cklee

unread,
Jan 9, 2020, 11:57:53 AM1/9/20
to XMPie Interest Group
I was afraid of that, but it makes perfect sense. Thanks for the detailed reply!
Reply all
Reply to author
Forward
0 new messages