JavaScript-getting original PDF info/path

Post Reply
Karma
Newbie
Posts: 4
Joined: Mon Feb 25, 2019 9:32 am

JavaScript-getting original PDF info/path

Post by Karma »

Hi All,

I got a problem regarding getting original PDF info/path.

Here is my flow step:

1. User will add a PDF file in the main folder.
2. A script (Script 1) will run and add watermark in the PDF file.
3. After successfully added watermark, another script (Script 2) will run. For the time being, this script function is to get an info of original PDF that user put in the main folder.

The problem is to get an info/path of original PDF before adding watermark in the main folder. I already try using global script $infile but it return temp folder /auto managed/myfile.pdf path in the switch instead of the original PDF file.

Can someone guide me regarding this?

Do I need to enable some function in there?

you may find attached file for simple flow created for the process.
flow.PNG
flow.PNG (3.67 KiB) Viewed 4593 times
thank you in advance.

Regards,
karma
LasseThid
Advanced member
Posts: 353
Joined: Tue Mar 03, 2015 2:30 pm
Location: Molndal, Sweden

Re: JavaScript-getting original PDF info/path

Post by LasseThid »

If you're trying to find out which folder the pdf was originally in before it was moved to the Main Folder, I doubt you will be able to find that info in Switch. Hopefully I'm wrong, but it would surprise me if you can find it.
Enfocus Switch, Enfocus PitStop Server, Enfocus PDF Review, HP SmartStream& Kodak Prinergy with RBA
Offset 72x102, Offset Large Format, Digital Large Format and Digital print.
Malcolm Mackenzie
Member
Posts: 121
Joined: Wed Mar 22, 2017 5:05 pm
Location: London, UK
Contact:

Re: JavaScript-getting original PDF info/path

Post by Malcolm Mackenzie »

Is the main folder Auto Managed or fixed path?
You can try using Submit Hierarchy instead and that allows you to embed the folder structure to pick up as a variable.
Post Reply