• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script to delete everything except images

Explorer ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

Is there a way to delete everything from an Indesign file except placed images? Maybe a script or plug-in? Thanks.

TOPICS
Scripting

Views

502

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

I have found a script that deletes all text boxes. That leaves lines and unassigned frames. I only want to keep the images to create patch color proof for clients.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

Rather than delete everything, which seems unnecessary for the purposes of generating a proof, why not just move all the images to their own layer and then output visibile layers?

 

var doc = app.activeDocument;
var graphics = doc.allGraphics;
var proofLayer = doc.layers.add();
proofLayer.name = "Proof";
for (var i = 0; i < graphics.length; i++) {
    graphics[i].parent.itemLayer = proofLayer;
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

I think that would be multiple page proofs. I am trying to combine all images into one large page proof for inkjet output (28x40) at the original InDesign document placed size. I guess I could use this and delete the other layer?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

Well, that's a bit different than deleting everything but image frames. If you did that, all the images would be left on their respective pages. The following script will copy all the images of an active document to the first page (presumably your 28x40) on a second open document. Ensure the document with the images is active on your screen. You'll have to rearrange yourself. Or yes, you could trash the other layers if that works better for your workflow. 

 

 

var doc = app.documents[0];
var targetDoc = app.documents[1];
var graphics = doc.allGraphics;
for (var i = 0; i < graphics.length; i++) {
    app.contentPlacer.load(graphics[i]);
}
app.activeDocument = targetDoc;

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

Thank you for your help. That's pretty cool, but having to rearrange 240 images layered on top of each other is a pain. I can use your script though to move the images to the content collector and then place one at a time with smart guides to distribute spacing and pages. Thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

In that case: 

 

var doc = app.documents[0];
var targetDoc = app.documents[1];
var graphics = doc.allGraphics;
for (var i = 0; i < graphics.length; i++) {
    app.contentPlacer.load(graphics[i]);
}
app.activeDocument = targetDoc;

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

That didn't quite work. It put all images in content collector as one group, not separately to be placed. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

Edited above to make each load separately. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

That works perfectly. Thank you. Now if only the placement could be automatic. *sigh*

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 11, 2020 Sep 11, 2020

Copy link to clipboard

Copied

It could, but it's not an easy lift. Definitely possible though. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 12, 2020 Sep 12, 2020

Copy link to clipboard

Copied

Yes. You'd need a best-fit algorithm. Something along the lines of how Google Photos moves around photos to get as many as possible in a certain space. There must be some algorithm somewhere that can be adapted to work in InDesign.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

Ideally what I need is a script/plug-in to take all images from an InDesign file and place them into a new InDesign file to my size specification, positioning them on the page as necessary to save space and adding additional pages if needed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 16, 2020 Sep 16, 2020

Copy link to clipboard

Copied

You could Package the file, which would gather all of the images into the Links folder, and then use the ImageCatalog script that ships with ID.

 

If you are using OSX this AppleScript version lets you set the catalog page size:

 

https://shared-assets.adobe.com/link/538e23f5-2498-4a33-6ce0-17a2fdc8864a

 

Screen Shot 21.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 16, 2020 Sep 16, 2020

Copy link to clipboard

Copied

Unfortunately, this will not work for my needs because I need them at the size placed in the original file. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 16, 2020 Sep 16, 2020

Copy link to clipboard

Copied

Hi photoretouchpro,

would it work for you if a script duplicates all images of a given document to a new document where every image gets a new page and every page size fits the size of the individual image?

 

Now export to PDF where every PDF page has a different size if required.

Then print the PDF through an imposition software to your proofing device where the proofing device uses a "gang-up" imposition feature.

 

Regards,
Uwe Laubender

( ACP )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 16, 2020 Sep 16, 2020

Copy link to clipboard

Copied

LATEST

I think this may work for proofing but I use the proof to do color adjustments to the images and it may be difficult to find the image to correct when referencing the proof. Perhaps if there was a page number on the proof near the image it may work. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines