I have a small issue,
Code: Select all// reference active document
var docRef = app.activeDocument;
// build string of full path till folder name
var fullpath = docRef.path.fsName;
alert(fullpath);
The above code works fine for all active images and shows me the full path till folder name, however when it comes to PDF files it does not work.
I want to know a simple way to get the folder path of PDF documents so that I can save the modified pdf in the same location via scripting.
Please help.
My PDF files have a single page only.basically I want to resize it and save as jpeg in the same folder via scripting.
VIsmay
Photoshop script to read folder path for active PDF documnt
Photoshop script to read folder path for active PDF documnt
Your script needs to save this info from the file before opening ( rasterising )… A rasterised PDF is a unsaved document…
If there is ONLY one file open when your script is running then you should be able to call the recent files list…
The first being the last thing opened…
app.recentFiles[0]
If there is ONLY one file open when your script is running then you should be able to call the recent files list…
The first being the last thing opened…
app.recentFiles[0]