Document name added to a variable position based on file name

Post Reply
abonsey
Member
Posts: 98
Joined: Fri May 24, 2013 5:10 pm

Document name added to a variable position based on file name

Post by abonsey »

I have multiple PDFs being input to a Switch hotfolder. Each PDF contains imposed artwork that can vary in position on the page from PDF to PDF. What is common is the position based on the file name ie

*SML* = will have artwork in one position
*LRG* = will have artwork in a different position.

What I want to be able to do is use the "variable" of the filename to determine where I add a text line (slugline) on the page
ie
filename containing SML will have x,y of 5,5
filename containing LRG will have x,y of 10,10

I can make it work having multiple fixed actions but I'm trying to condense into one action that can read the filename and place the text accordingly.

Is this possible as I struggle to use the filename as in input variable.

Hope that makes some kind of sense :? :?
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Document name added to a variable position based on file name

Post by gabrielp »

Do you have the scripting module?
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
abonsey
Member
Posts: 98
Joined: Fri May 24, 2013 5:10 pm

Re: Document name added to a variable position based on file name

Post by abonsey »

Yep. Sure do.
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Document name added to a variable position based on file name

Post by gabrielp »

If you want it done in one step, you'll have to build a script to translate that variable in the file name to the coordinate values, possibly saving them in private data. If you didn't have the scripting module, you could route jobs around and use JobState for this.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Post Reply