XML Log entries in random order

Post Reply
nnater
Newbie
Posts: 13
Joined: Fri May 09, 2025 11:29 am

XML Log entries in random order

Post by nnater »

In Switch, I'm running a single action list. The action list places two white rectangles on the page and sets them to knock out, so that only a 1cm column of the layout is visible. It then gathers the ink info. After that, it moves the two rectangles 1cm to the right and gathers the ink info again. With that, I'm trying to figure out with 1cm column of the PDF has the highest ink coverage (it would take to long to explain why this is needed in my case). This works fine so far.

However, the child nodes for the path

Code: Select all

/EnfocusReport/InkInfo/DocumentInkInfo/InkPercentage
(or

Code: Select all

count(/EnfocusReport/InkInfo/DocumentInkInfo[not(../DocumentInkInfo/InkPercentage > InkPercentage)]/preceding-sibling::*)
to be more precise as I'm trying to find the index with the highest coverage) in the XML log that PitStop Server creates and Switch evaluates, are in a different order every time I run the action list with the same PDF. My expected behaviour was that PitStop would log the first time I gather ink info in child 1, the second time in child 2 etc. Is there a way to achieve that?
Attachments
GatherColorInfo.eal.zip
Action list in PitStop
(11.1 KiB) Downloaded 547 times
Structure of the Action list
Structure of the Action list
Bildschirmfoto 2026-06-17 um 12.07.43.png (96.63 KiB) Viewed 10516 times
freddyp
Advanced member
Posts: 1207
Joined: Thu Feb 09, 2012 3:53 pm

Re: XML Log entries in random order

Post by freddyp »

That is the way it is and usually the order is not important. But as is sometimes the case, there are exceptions. I am interested in knowing what the use case is, though. Perhaps it is worth appifying this?

I have the impression the number of columns/strips is known and the document has 1 page. Assuming this for a moment, I can think of the following strategy (not tested):
Copy the contents of page 1
Add pages
Select page range from 2-
Paste the contents (without moving it!)

You now have a document with as many pages as columns.

Split Action List (this Action means: start again at page 1)
Select page 1
Set the media box and set the crop box to the media box
Do this for all pages

Split Action List
Select all
Gather ink information

Now everything will be in order and there is also the page number to tell you which column has the one with the highest ink coverage.
nnater
Newbie
Posts: 13
Joined: Fri May 09, 2025 11:29 am

Re: XML Log entries in random order

Post by nnater »

That's a very smart idea, Freddy. That worked, thank you!

The use case I'm faced with is automatic placement of color strips on envelopes. We'd like to automatically place them in the best possible ink zone for our printers to measure by hand. (This is suprisingly tough to describe in a second language, I hope this makes sense...)
Post Reply