Separate multiple sets of trim marks

Post Reply
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Separate multiple sets of trim marks

Post by saitok »

Hi,

I want to split a page of PDF which has multiple sets of trim marks to multiple pages which has single set of marks on each page.
I know we can do that if the position of the marks is fixed even if roughly.
However, it's not fixed in this case.

If I can know the coordinate(X,Y) of the marks using something like an image recognition engine, I think I can split by Switch.

Is there any good software or command like that?

Regards,
Image
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Separate multiple sets of trim marks

Post by freddyp »

There is a PitStop Action "Check if visual content exists" that uses image recognition. With this Action you could search for the top-left marks and for the bottom-right marks separately and afterwards analyze the report to find the locations so you can cut the PDF into pieces. Then you can use the Action "Use trim marks to set page box" to set the page box correctly on the individual parts. Not straightforward!
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: Separate multiple sets of trim marks

Post by saitok »

Thank you Freddy,

Very interesting.
I've never treid this.

However, when I take a mark into the Action, an alert like the screenshot is shown. :(

Regards,
Image
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Separate multiple sets of trim marks

Post by freddyp »

What if you try the complete left side of the marks? And the same for the right side? Or the top and the bottom?

Share the file please.
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: Separate multiple sets of trim marks

Post by saitok »

I don't know what is the preferred way to share, but you can download the PDF here.
https://we.tl/t-CG9bpkpCIu

Only case I can grab the marks without the alert is grabing all marks on the 4 corners at once.
However, the Action created like that doesn't find anything on my PDF.

Thanks,
Image
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: Separate multiple sets of trim marks

Post by saitok »

I could do this using this flow.
I guess it includes Action Lists we need.
But I also use Shell script in this to compare coordinates provided by Preflight report.
minX.sh is like:

#!/bin/bash

IFS=$'\n'

numbers=($1)
echo ${numbers[@]} | awk '{
min = $1
for(i = 2; i <= NF; i++) min = $i < min ? $i : min;
print "<minX>" min "</minX>"
}'

Regards,
Attachments
複数トンボの分割.sflow.zip
(190.29 KiB) Downloaded 133 times
Post Reply