home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Internet Web Designer 86
/
PIWD86.iso
/
pc
/
contents
/
illustration
/
software
/
Installer
/
data1.cab
/
Program_Files
/
Presets
/
Scripts
/
SaveDocsAsPDF.js
< prev
Wrap
Text File
|
2001-11-29
|
697b
|
30 lines
numDocuments = documents.length;
for ( i = 0 ; i < numDocuments; i++)
{
aDocument = documents[i];
theDocumentName = aDocument.name;
pdfSaveOptions = new PDFSaveOptions();
pdfSaveOptions.embedAllFonts = true;
pdfSaveOptions.preserveEditability = true;
docPath = aDocument.path;
docPathStr = docPath.toString();
if (docPathStr.length > 1)
{
documentPath = aDocument.path + "/" + aDocument.name;
}
else
{
// This is a brand new file and doesn't have a path yet,
// so put it in the illustrator application folder.
documentPath = path + "/" + aDocument.name;
}
theFile = new File(documentPath);
aDocument.saveAs(theFile, pdfSaveOptions);
}