Copy link to clipboard
Copied
hi everybody from france
i would like know how to open a indesign file (register each path for each file)
open all
update all
save all
export the current page to pdf (register each path save for each path source)
thanks
Copy link to clipboard
Copied
mike thanks, but you lost me...
Copy link to clipboard
Copied
mike can you explain me where i can paste your code? because i try to check with video for create a script but i have not find
Copy link to clipboard
Copied
Copy link to clipboard
Copied
thanks peter, work perfectly
Copy link to clipboard
Copied
Copy link to clipboard
Copied
> i try to save the profil for not restart everytime, and each time batch preset is none
I'm afraid I don't understand what you mean here
> second problem i have activate update automaticaly link, but it ask me each time to update
When you enable 'Ignore errors' you won't see those error messages.
P.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
hi peter, i have not all answer for continue to my side
first: how to save setting for the next use? because not work
second: how to export pdf (interactive) at same level than file (in same folder)
thanks
Copy link to clipboard
Copied
> how to save setting for the next use? because not work
The settings should be saved automatically and the scripot should use them the next time you run the script. Please delete the batch_convert.txt file, you can see it in the Scripts panel. Right-click it and delete it. That usually sorts out the problem.
> hover the mouse pointer over the 'Output folder' field an you'll see a text balloon that explains it. It's also on the script's web page: leave the 'Output folder''s text field blank and check 'Include subfolders'. That way all PDFs are saved in the same folders that the indds are in.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Enable the 'Ignore errors' checkbox.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
> but if ignore error, mean it will be update or not?
The files will be exported/converted anyway. The errors are those that InDesign shows when you open a document: missing links, missing fonts, that kind of thing.
> this attached setting is ok?
Yes, looks fine.
> why preset batch save not work?
I've no idea. I haven't heard that problem before.
Copy link to clipboard
Copied
there is a solution for update all link inside document? because for exemple i have modify 1 picture common at all document linked inside, and i need to open all link one by one for exprt the latest document...
and other problem, i have choose a folder with sub folder, for package with only keed structure folder, include sub folder, ignore error, overwrite, update link, and save and closed
result is 1100 link, but very often, it as me to click for save and overwrite.....
and in each folder it s every time the same name file (different by path, but same name), but it s not all file
i do that for open all indd files, update and save
Copy link to clipboard
Copied
i have try this code
var topFolder = (Folder.selectDialog("Select the top level folder."))
var fileandfolderArray = scanSubFolders(topFolder,/\.(indd)$/i);
var fileList = fileandfolderArray[0];
for (var i = 0; i < fileList.length; i++) {
var myFile = fileList[i];
app.open(myFile);
while (app.documents.length > 0) {
var doc = app.activeDocument;
var docName = fileList[i].name.replace(/\.[^\.]+$/, '');
var outputFolder = Folder(doc.path);
var newFile = new File(decodeURI(outputFolder) + "/" + docName + ".pdf");
app.runMenuItem(stringIDToTypeID("placedLayerUpdateAllModified"));
exportOptions = new ExportOptionsSaveForWeb();
exportOptions.format = SaveDocumentType.pdf;
exportOptions.PNG8 = false; // false = PNG-24
exportOptions.transparency = true; // true = transparent
exportOptions.interlaced = false; // true = interlacing on
exportOptions.includeProfile = true; // false = don't embedd ICC profile
doc.exportDocument(newFile, ExportType.SAVEFORWEB, exportOptions);
doc.close(SaveOptions.SAVECHANGES);
}
}
alert("Done processing files!")
function scanSubFolders(tFolder, scanMask){
var subFolders = new Array();
var allFiles = new Array();
subFolders[0] = tFolder;
for (var j = 0; j < subFolders.length; j++){
var procFiles = subFolders[j].getFiles();
for (var i = 0; i< procFiles.length; i++){
if (procFiles[i] instanceof File ){
if(scanMask == undefined) allFiles.push(procFiles[i]);
if (procFiles[i].fullName.search(scanMask) != -1) allFiles.push(procFiles[i]);
}else if (procFiles[i] instanceof Folder){
subFolders.push(procFiles[i]);
scanSubFolders(procFiles[i], scanMask);
}
}
}
return [allFiles,subFolders];
};
, but it just a test it need to be adapt at indesign and for pdf, if someone can help me?, error attached
Copy link to clipboard
Copied
That script is what I posted for you to use in Photoshop, it can be modified to use in Indesign but we need to know what kind of pdf you're tring to export and if you have an Adobe PDF export preset you're using.
Regards,
Mike
Copy link to clipboard
Copied
Some scripts that might help.
InDesign
https://www.marspremedia.com/software/indesign/batch-export
https://www.marspremedia.com/software/indesign/export-named-pages
Photoshop
https://www.marspremedia.com/software/photoshop/batch-multi-save
https://www.marspremedia.com/software/photoshop/images-to-pdf