Page 1 of 1

How to create an Action List to swap two text blocks in a label PDF?

Posted: Tue May 27, 2025 9:47 am
by mathien02vn
Hi everyone,

I have a label PDF file (used for product packaging) that contains two blocks of size information: one for WMNS and one for MENS. The layout looks like this:


https://upanh.org/image/Screenshot-2.jqMp8L

I need to swap the two blocks, so the MENS block appears at the top and WMNS block moves below it, while keeping all other elements in place.

I'm using PitStop Pro, and I tried to edit manually, but the font is locked/embedded, so it's not easy to edit the content directly.

💡 My idea: Use Action List to automatically select the text blocks and move them (e.g., move top block down and bottom block up).

🔍 Has anyone done something similar? Can you guide me how to:

1 Use Action List to select specific blocks of text based on position

2 Move them to swap positions

3 Apply this to a large batch of PDFs with the same layout

Any help or examples would be greatly appreciated!

Thanks in advance! 🙏

Re: How to create an Action List to swap two text blocks in a label PDF?

Posted: Tue May 27, 2025 10:43 am
by JimmyHartington
Can you post a sample pdf of one page?
Do all the labels have the same size in mm?

Is it these 2 blocks which needs to switched:
Image

My approach would be to select by region the WMNS block.
Set a custom spot to the text.
Select by region the MENS block.
Set a different spot to that text.
Select WMNS spot and move the selection.
Select MENS spot and move the selection.
Set the colors to white again.

Re: How to create an Action List to swap two text blocks in a label PDF?

Posted: Tue May 27, 2025 11:09 am
by mathien02vn
JimmyHartington wrote: Tue May 27, 2025 10:43 am Can you post a sample pdf of one page?
Do all the labels have the same size in mm?

Is it these 2 blocks which needs to switched:
Image

My approach would be to select by region the WMNS block.
Set a custom spot to the text.
Select by region the MENS block.
Set a different spot to that text.
Select WMNS spot and move the selection.
Select MENS spot and move the selection.
Set the colors to white again.
yes . this is sample pdf of one page https://drive.google.com/file/d/1n-SKg7 ... sp=sharing
"I want to move the entire green block down to where the red block is, and move the red block up to where the green block is.", Or can you create an action lists for me ? https://upanh.tv/image/z6644318954909-c ... b8ed.IBi6E

Re: How to create an Action List to swap two text blocks in a label PDF?

Posted: Tue May 27, 2025 12:05 pm
by JimmyHartington
Here is an action list.
https://github.com/jimmyhartington/pits ... blocks.eal

I decided to assign the objects to layers named WMNS and MENS. And then used this to select the items afterwards.
They are selected by region, so please test on a bigger sample to see if this file was representative of the entire batch.

This could probably also be done by copying and pasting.
CleanShot-CleanShot-2025-05-27 at 12.04.40@2x.jpg
CleanShot-CleanShot-2025-05-27 at 12.04.40@2x.jpg (60.67 KiB) Viewed 1136 times