"Assemble job" doesn't compose job from "Ungroup job"

Post Reply
pfischer
Member
Posts: 43
Joined: Tue May 14, 2013 4:57 pm

"Assemble job" doesn't compose job from "Ungroup job"

Post by pfischer »

Hello together,
I hope someone can help me.

This is my task I want to solve with Switch.
A multi-page PDF (spread pages) has to be split in single pages. All pages has to be duplicated. One part has to be renamed in a sepate way as even pages, the other part has to be renamed in a separeate way as odd pages. After that, all files has to be put together as one job.
In my flow, the collection of all files together doesn't work. Although I use "Ungroup job" after splitting the PDF (I work with private data "ungroup") and try to reassemble all files at the end with "Assemble job" (selection "ungroupe job", private data: "ungroup"), I get two folders at the end. One with the one half of the files and one half with the other files.
The flow creates two folders with the same name (of the origin PDF).

This is an example-PDF my flow step by step:
1. input file is brochure.pdf. It contains 5 spread-pages.
2. "Split PDF" splits it in single pages. Files were numbered with a prefix "[Index]_" Result is folder named "brochure" which contains 5 PDFs:
01_brochure.pdf
02_brochure.pdf
...
05_brochure.pdf
3. "Ungroup job" - Private data "ungroup". Result are the single ungrouped PDFs.
4. Two separate Renaming process way:
The first for even pages. Result is 02_brochure.pdf, 04_brochure.pdf, 06_brochure.pdf... 10_brochure.pdf
The second one is for odd pages. Result is 01_brochure.pdf, 03_brochure.pdf, ... 09_brochure.pdf
5. Both process way end in one folder which contains all 10 PDFs:
01_brochure.pdf
02_brochure.pdf
...
10_brochure.pdf
6. "Assemble job" should reassemble all files in one Folder with the name "brochure".
But the result are two folders:
"brochure" (contains 5 PDFs)
"brochure1" (contains the other 5 PDFs)

My question is: why doesn't "Assemble job" doesn't recognize that this is ONE job and all files belong together? It handles it like two jobs with the same name (in this case "brochure").


flow_ungroup.png
Media asset and production specialist
Group Communications / System Operations
Phoenix Contact GmbH & Co. KG
www.phoenixcontact.com
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: "Assemble job" doesn't compose job from "Ungroup job"

Post by jan_suhr »

What is your property setting "Scheme" for the Assemble Job?

Have you tried to use the "Custom" scheme with a Job Identifier? if could for example be the filename proper after your prefixes
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: "Assemble job" doesn't compose job from "Ungroup job"

Post by freddyp »

The "Scheme" - "Ungrouped job" is OK but you have to change the "Number of files" property from "Automatic" to a value because the number of files changes. Take care as well that the private data is not "ungroup" but "Ungroup" (unless you changed it) and that you need to do a Switch.Calculation on "Ungroup.NumFiles". Read the Switch documentation on "Ungroup job" and look at all the pieces of private data it creates.

This being said, there is an action in PitStop Server that splits pages in half (well, it is a Global Change so you have to save it as an Action List in order to use it in PitStop Server). You can even choose to do just the landscape pages for example. And there is no need to ungroup and assemble, there is just one simple element.
pfischer
Member
Posts: 43
Joined: Tue May 14, 2013 4:57 pm

Re: "Assemble job" doesn't compose job from "Ungroup job"

Post by pfischer »

Hi Freddy,
thank you so much - it works! I didn't know that "Automatic" meant the origin file number.

Next I will give the PitStop Global Change a chance. But in the end we need single pages for the exchange workflow with the print supplier and in our preparation process there are different tasks for even and odd pages.

And there is another question:
Is there a possibility to insert leading zeros while renaming?
One step to get even numbers in my flow is the following:
01_brochure.pdf -> 2_brochure.pdf (via calculation [Switch.Calculation:Expression="[Job.Name:Before="_"]*2"] on all digits before the underscore)
02_brochure.pdf -> 4_brochure.pdf
03_brochure.pdf -> 6_brochure.pdf

But I would like to get 2 leading zeros because there will be a few hundred PDFs.
Any idea? Thank you.
Media asset and production specialist
Group Communications / System Operations
Phoenix Contact GmbH & Co. KG
www.phoenixcontact.com
pfischer
Member
Posts: 43
Joined: Tue May 14, 2013 4:57 pm

Re: "Assemble job" doesn't compose job from "Ungroup job"

Post by pfischer »

Take a look at this post: viewtopic.php?f=12&t=3615#p10917

I solved the problem with leading zero with a regex-search/replace. Additionally I have to add a "p" at the beginning.
I have put it in a Switch-"Rename"-element. Maybe it's not the smartest way but it works for us.

Search: ^(\d{3})_
Replace: p\1_
Result: 300_name.pdf -> p300_name.pdf

Search: ^(\d{2})_
Replace: p0\1_
Result: 20_name.pdf -> p020_name.pdf

Search: ^(\d{1})_
Replace: p00\1_
Result: 1_name.pdf -> p001_name.pdf

Does lots of "Rename"-elements cost performance. I have the impression that the flows are slowing down a little bit ...
Media asset and production specialist
Group Communications / System Operations
Phoenix Contact GmbH & Co. KG
www.phoenixcontact.com
Post Reply