Copy link to clipboard
Copied
Hello everyone,
i want to embed the Images in around 500 InDesign Templates i have, to send each in one file with all the images included.
So i have 500 InDesign files where is all included.
There is no batch processing in Indesign i think and the Script i found, don't include the embedding of images.
If you have a solution for this problem, I would be very happy about an answer.
Thank you
You can try this code:
Where you have to select folder containing all the indesign files:
var myFolder = Folder.selectDialog ("Select Folder with all indd files");
var allINDDFiles = myFolder.getFiles("*.indd");//here you can change extension of you files ===
for(var i = 0; i < allINDDFiles.length; i++){
try{
var myDoc = app.open(allINDDFiles);
myDoc.links.everyItem().unlink();
myDoc.close(SaveOptions.YES);
}
catch(e){}
}
Best
Sunil
Copy link to clipboard
Copied
That is a horrible plan for anything other than the tiniest of images.
Instead, use the file > package command and then zip the package.
Copy link to clipboard
Copied
Thank you for the response.
Each of the file has only two pages, so its not the size, thats okay.
But i need a baching process to make it for over 500 files. Do you have a solution for that?
Copy link to clipboard
Copied
Do a book, add all files without auto-numbering. Do package of the book.
Tips & Techniques: Packaging multiple files at once
Copy link to clipboard
Copied
But is there an option to embedding the images in this process so i get only the .indd files with the images embedding in there and no other folders with the images?
I can do it manually, but then i have to open 500+ files and embedding all the pictures, save the file and close it.
I only need a process to automatic this step.
Copy link to clipboard
Copied
Moving the discussion to InDesign Scripting​ community.
Copy link to clipboard
Copied
I agree with Bob, but if your hand is forced and this is the way you have to do it, there is a script that will embed images in a file:
https://indesignsecrets.com/topic/automatically-embed-all-links-in-indesign
This will do one document at a time. However, combine this with Peter Kahrel's Batch Convert script and you could do it. Free script Batch convert/export InDesign documents | Peter Kahrel
You'd have all your ID files in one folder, run Peter's script, and convert from ID to an ID file, making sure to save changes on closing and to run the first script.
Copy link to clipboard
Copied
I agree, that's a suboptimal idea…
but if your really have to: Embedding Graphics in InDesign files via extension script · Issue #129 · Adobe-CEP/CEP-Resources · G...
Copy link to clipboard
Copied
Embedding images is the prominent reason when I get corrupted files. I cannot recommend to embed any image into InDesign.
Copy link to clipboard
Copied
I embed images all the time in InDesign files and <knock on wood> haven't had a file get corrupted from it ever. Many times it's the most convenient and sensible way to move layouts around, especially when sending to users not that familiar w/InDesign.
I think Colin Flashman's solution will work the best. I just tried that script in CC 2019 and it works fine.
AM
Copy link to clipboard
Copied
For me, it's "horses for courses". I find there are two workflows/situations where packaging is essential: (1) when sending your document to an external party (such as a design house, or a translation service); and (2), where the contents of the document would blow out the filesize if it was all embedded (for example, our brochures and other marketing collateral typically contain a number of large JPEGs).
But we also have workflows which deal with a lot of regulatory/legal documents which are text-heavy. These are instructions for use, product inserts, hazardous materials sheets etc. The only graphic content consists of a few logos, small icons and simple diagrams, all constructed as vectors. (Only our software user guide contains screenshots, as PNGs, but these are not large either.)
Our workflow requires us to store the documents on a server (SharePoint), and the documents are being constantly updated. Since InDesign doesn't like working over a network (not our network, anyway!), constantly zipping, packaging, unzipping and repackaging documents was a real pain. And when working on documents, it offered no real benefit.
Now, for those documents, we embed the graphics and store the InDesign files on the server. If we need to send a document to an external party, we unembed the graphics and make a zipped package, then reverse that process when the document is returned to us.
Copy link to clipboard
Copied
Oops! I couldn't find an Edit option...
The sentence And when working on documents, it offered no real benefit should read And when working on documents in house, it offered no real benefit.
Copy link to clipboard
Copied
You can try this code:
Where you have to select folder containing all the indesign files:
var myFolder = Folder.selectDialog ("Select Folder with all indd files");
var allINDDFiles = myFolder.getFiles("*.indd");//here you can change extension of you files ===
for(var i = 0; i < allINDDFiles.length; i++){
try{
var myDoc = app.open(allINDDFiles);
myDoc.links.everyItem().unlink();
myDoc.close(SaveOptions.YES);
}
catch(e){}
}
Best
Sunil