Page 1 of 1

JavaScript-getting original PDF info/path

Posted: Mon Feb 25, 2019 9:38 am
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 4602 times
thank you in advance.

Regards,
karma

Re: JavaScript-getting original PDF info/path

Posted: Mon Feb 25, 2019 12:16 pm
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.

Re: JavaScript-getting original PDF info/path

Posted: Mon Feb 25, 2019 12:52 pm
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.