Rename PDF in flow

Post Reply
NightCat
Newbie
Posts: 3
Joined: Fri Jan 27, 2017 9:43 am

Rename PDF in flow

Post by NightCat »

Hello.

I have problem with rename PDF file in my flow.
My flow checking every page of pdf document.
1) If all documents pages has only CMYK colors, final pdf file should has prefix CMYK_Job_name.pdf
2) If all documents pages has only one color, final pdf file should has prefix 1color_Job_name.pdf
3) If documents has both CMYK colors and one color pages, final pdf should has prefix MIX_Job_name.pdf

I don’t have scripting and metadata modules.
How can I rename pdf in my flow?
My_flow.png
My_flow.png (28.89 KiB) Viewed 5600 times
numnational
Member
Posts: 38
Joined: Tue Sep 30, 2014 3:28 pm

Re: Rename PDF in flow

Post by numnational »

Maiby you can add a pitstop server between the folders "one color" and "Folder 4" to add a test to count the number of color ?
rakesh kumar
Newbie
Posts: 12
Joined: Fri Jan 27, 2017 1:05 pm

Re: Rename PDF in flow

Post by rakesh kumar »

Hi,
You can use the two rename configurator one is use after the CMYK Pdf Sepration folder and another is use one color Pdf sepration folder.

and set the properties.
freddyp
Advanced member
Posts: 1022
Joined: Thu Feb 09, 2012 3:53 pm

Re: Rename PDF in flow

Post by freddyp »

Run PitStop Server with a preflight profile that does not check anything, but that puts "Ink information" in the report. You do that by setting that option in the "General" tab of the profile. The other info toggles can be off.

The output of the PitStop Server should include an XML report as a dataset.

You then build a condition with variables:

Code: Select all

[Metadata.Text:Path="count(//Instance[Location/@page != -1]/Var[@name='Coverage']//Var[count(Var) = 1])",Dataset="Xml",Model="XML"]
Equal to
[Stats.NumberOfPages]

The above counts the number of pages that have 1 ink. If that is equal to the number of pages of the PDF file you know that all pages only use 1 ink.

Remark: make sure to use the correct dataset name in the metadata variable! A simply copy&paste may not work.

You can do the same for the number of inks being 4 (change count(Var) = 1 to count(Var) = 4). The other case is "All other jobs".

Note that this solution works only on the number of inks, not on the names! So if with 1 ink you mean black you will need a variation:

Code: Select all

count(//Instance[Location/@page != -1]/Var[@name='Coverage']//Var[count(Var) = 1 and Var[1]/@name='Black'])
and for CMYK that would be:

Code: Select all

count(//Instance[Location/@page != -1]/Var[@name='Coverage']//Var[count(Var) = 4 and Var[@name='Black'] and Var[@name='Cyan'] and Var[@name='Magenta'] and Var[@name='Yellow']])
Post Reply