Creating variables from Pitstop report xml
-
- Newbie
- Posts: 6
- Joined: Tue Sep 16, 2025 8:10 pm
Creating variables from Pitstop report xml
I'm trying to build a flow that sorts a 2 page pdf so the page with less ink coverage is ordered first. I have a preflight check with pitstop server configured to output job data with an xml log. I assume I just need to map this snippet of xml to variables (Page 1 ink percentage = 143.01, Page 2 Ink percentage = 57.03) so I can configure a routing connection. How can I go about doing this?
- Attachments
-
- Screenshot 2025-09-23 at 10.05.37 AM.png (207.46 KiB) Viewed 902 times
-
- Screenshot 2025-09-23 at 10.05.29 AM.png (210.54 KiB) Viewed 902 times
- magnussandstrom
- Advanced member
- Posts: 526
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Creating variables from Pitstop report xml
I can think of a couple of ways to do this. Do you have the scripting module for Switch?
-
- Newbie
- Posts: 6
- Joined: Tue Sep 16, 2025 8:10 pm
Re: Creating variables from Pitstop report xml
Yes, I do have a trial of the scripting module
- tdeschampsBluewest
- Member
- Posts: 147
- Joined: Tue Jun 01, 2021 11:57 am
Re: Creating variables from Pitstop report xml
Hello,
It may be possible to complete this process without the need for scripting by following these steps:

It may be possible to complete this process without the need for scripting by following these steps:
- Split the PDF
- Ungroup the job
- Run a preflight check to obtain ink coverage data
- Rename the job, using the ink coverage value as a prefix
- Add leading zeros to ensure consistent digit length across all filenames
- Reassemble the ungrouped job
- Merge the files

Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
Feel free to leave a comment on the Appstore!
- magnussandstrom
- Advanced member
- Posts: 526
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Creating variables from Pitstop report xml
I was thinking of the same solution, but how would you add leading zeros when one file is names 57 and another 158 (to get 0057 and 0158)?
- tdeschampsBluewest
- Member
- Posts: 147
- Joined: Tue Jun 01, 2021 11:57 am
Re: Creating variables from Pitstop report xml
Using the latest versions of the Rename Job tool there's a handy new action called "Add Leading Zeros".
To make it work, you'll need to add a regular expression to find the number you want to pad in your filenames.
Example filenames:
Use this regex to target the number before the `.pdf` extension:
This feature wasn’t heavily advertised, but it’s super useful when dealing with numbers.
To make it work, you'll need to add a regular expression to find the number you want to pad in your filenames.
Example filenames:
Code: Select all
123456_toto_35.pdf
123456_tata_8.pdf
Code: Select all
\d+(?=\.pdf)
Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
Feel free to leave a comment on the Appstore!