Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pdf_export [2024/04/04 09:05] – [Javascript] o2admin | pdf_export [2024/04/04 09:08] (current) – [Javascript] o2admin | ||
---|---|---|---|
Line 29: | Line 29: | ||
==== Javascript ==== | ==== Javascript ==== | ||
- | You can run Extendscript (Illustrator' | + | You can run Extendscript (Illustrator' |
* Return an array with the find and replace values such as [{ find: " | * Return an array with the find and replace values such as [{ find: " | ||
Line 49: | Line 49: | ||
<sxh javascript; > | <sxh javascript; > | ||
- | // This example will extract the ID number from a filename and save the PDF to a master folder based on the ID | + | // This example will extract the ID number from a filename and |
- | // " | + | // save the PDF to a master folder based on the ID in the X: drive |
+ | // " | ||
+ | // Get the current document filename | ||
var docName = getData(' | var docName = getData(' | ||
- | var matches = docName .match(/J(\F+)/); | + | |
+ | // Use a Regular Expression to get the ID | ||
+ | var matches = docName.match(/ | ||
if (matches) { | if (matches) { | ||
- | setPath(' | + | setPath(' |
return []; | return []; | ||
} | } |