Xml Pickup File Patterns

Post Reply
Qpdv
Member
Posts: 22
Joined: Thu Dec 03, 2015 2:59 pm

Xml Pickup File Patterns

Post by Qpdv »

Hi,

We use an external imposition tool which automatically impositions pdf files. We place the pdf files in a folder and they get processed.
To report back to the client about the imposition the imposition tool modifies the pdf file name slightly so that the user gets informed about the imposition quantity. Before this we export meta data.

e.g. :
The pdf filename that will be send to the imposition tool looks like this:

Code: Select all

i_m04605856_i1_w210_h297_bst.pdf
The filename that will be outputted looks likes this (We can modify this when needed).

Code: Select all

i_m04605856_i1_w210_h297_bst_2.pdf //!note the added "_2".
To (re)import the job we use the XmlPickup plugin. How can I specify the filename pattern so that the xml gets picked up?

Thanks in advance,

Peter
freddyp
Advanced member
Posts: 1022
Joined: Thu Feb 09, 2012 3:53 pm

Re: Xml Pickup File Patterns

Post by freddyp »

I assume that your XML file is called i_m04605856_i1_w210_h297_bst.xml.

Can't you pick up the XML before doing the imposition? There are chances the dataset will still be there after the imposition, but there is not enough information on how it works exactly to be able to judge this. Let's assume the pick-up before the imposition does not work.

The _2 is bothering you so you should remove it with "Rename job" - "Action - Search and replace"; you are searching for a regular expression _\d+$ (underscore and 1 or more digits at the end of the string (name proper, of course)), and replacing it by nothing.

However, you need the _2 of course, so you should store it first, for example in [Job.JobState]: on a folder you define "Attach job state" as [Job.NameProper:Search="_\d+$"]. You can then use [Job.JobState} in an another rename to add it back to the job name.

The sequence is: store _2 in the job state, rename the job to remove the _2, do the XML pickup-up, rename the job to add the _2 again taking it from the job state.
Post Reply