Highlighted

Batch Edit in Indesign

Community Beginner ,
Apr 20, 2020

Copy link to clipboard

Copied

I have roughly 200 datasheets that are styled up in InDesign. I have a VIP customer who'd like a copy of each one, with his logo instead of mine (and some colour changes). 

 

If this was a photoshop doc I could probably work something out with the Batch process function. Is there any way in indesign for me to: 

 

1. Open an INDD file
2. Replace the linked logo.ai with logo_customer.ai

3. Edit swatch colour value 

4. Export to PDF 

5. Save As [old_filename]_customer.indd

 

It feels like this kind of task must be possible but I can't for the life of me work out how to do it! 

Here I wrote a script for you to be used in the batch processor:

main();

function main() {
	var doc = app.activeDocument;

	// Relink to the customer logo located in the same folder
	var logo = doc.links.itemByName("logo.ai");
	if (logo.isValid) {
		var logoCustomerFilePath = File(logo.filePath).path + "/logo_customer.ai";
		var logoCustomerFile = new File(logoCustomerFilePath);
		if (logoCustomerFile.exists) {
			logo.relink(logoCustomerFile);
		}
	}
	
	// Edit a swatch
	var swatch = doc.swatches.itemByName("C=15 M=100 Y=100 K=0");
	if (swatch.isValid) {
		with (swatch) {
			colorValue = [30, 90, 90, 10];
		}
	}

	// Export to PDF to the same location as INDD
	var pdfFilePath = doc.fullName.absoluteURI.replace(/indd$/, "pdf");
	var pdfFile = new File(pdfFilePath);
	var pdfPreset = app.pdfExportPresets.itemByName("[Press Quality]");
	var pdfFileExported = doc.exportFile(ExportFormat.PDF_TYPE, pdfFile, false, pdfPreset);
	
	// Save as a copy
	var docFilePath = doc.filePath.absoluteURI;
	var newDocPath = docFilePath + "/" + doc.name.replace(/\.indd$/, "") + "_customer.indd";
	var newDoc = new File(newDocPath);
	doc.saveACopy(newDoc);
}

I don't know your specific requirements so adjust it to your needs. or use it as a starting point.

2020-04-20_19-04-34.png

Hope it helps!

— Kas

TOPICS
How to, Import and export

Views

618

Likes

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

Batch Edit in Indesign

Community Beginner ,
Apr 20, 2020

Copy link to clipboard

Copied

I have roughly 200 datasheets that are styled up in InDesign. I have a VIP customer who'd like a copy of each one, with his logo instead of mine (and some colour changes). 

 

If this was a photoshop doc I could probably work something out with the Batch process function. Is there any way in indesign for me to: 

 

1. Open an INDD file
2. Replace the linked logo.ai with logo_customer.ai

3. Edit swatch colour value 

4. Export to PDF 

5. Save As [old_filename]_customer.indd

 

It feels like this kind of task must be possible but I can't for the life of me work out how to do it! 

Here I wrote a script for you to be used in the batch processor:

main();

function main() {
	var doc = app.activeDocument;

	// Relink to the customer logo located in the same folder
	var logo = doc.links.itemByName("logo.ai");
	if (logo.isValid) {
		var logoCustomerFilePath = File(logo.filePath).path + "/logo_customer.ai";
		var logoCustomerFile = new File(logoCustomerFilePath);
		if (logoCustomerFile.exists) {
			logo.relink(logoCustomerFile);
		}
	}
	
	// Edit a swatch
	var swatch = doc.swatches.itemByName("C=15 M=100 Y=100 K=0");
	if (swatch.isValid) {
		with (swatch) {
			colorValue = [30, 90, 90, 10];
		}
	}

	// Export to PDF to the same location as INDD
	var pdfFilePath = doc.fullName.absoluteURI.replace(/indd$/, "pdf");
	var pdfFile = new File(pdfFilePath);
	var pdfPreset = app.pdfExportPresets.itemByName("[Press Quality]");
	var pdfFileExported = doc.exportFile(ExportFormat.PDF_TYPE, pdfFile, false, pdfPreset);
	
	// Save as a copy
	var docFilePath = doc.filePath.absoluteURI;
	var newDocPath = docFilePath + "/" + doc.name.replace(/\.indd$/, "") + "_customer.indd";
	var newDoc = new File(newDocPath);
	doc.saveACopy(newDoc);
}

I don't know your specific requirements so adjust it to your needs. or use it as a starting point.

2020-04-20_19-04-34.png

Hope it helps!

— Kas

TOPICS
How to, Import and export

Views

619

Likes

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
Apr 20, 2020 0
Adobe Community Professional ,
Apr 20, 2020

Copy link to clipboard

Copied

Just had a look and does this article help..?

https://indesignsecrets.com/creating-batch-pdfs.php

Likes

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
Reply
Loading...
Apr 20, 2020 1
Guru ,
Apr 20, 2020

Copy link to clipboard

Copied

This can be done easily with my batch processor.

— Kas

Likes

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
Reply
Loading...
Apr 20, 2020 1
Adobe Community Professional ,
Apr 20, 2020

Copy link to clipboard

Copied

You can change the color of a tint in a PDF using an Acrobat Preflight Fixup, which can be applied to all 200 PDFs at once. Make a copy of this Preflight and edit it, adding the color to change and the desired color. Add the new preflight to an action, using the Action Wizard and apply the Action to a folder containing the 200 PDFs. As for the new logo, edit it in Illustrator so it is the same size as the old logo (edit artboard), then rename the original logo to hide it from InDesign and select the new logo as the replacement. Not automated, but this should save some time.

Map specific color.png

Likes

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
Reply
Loading...
Apr 20, 2020 1
Guru ,
Apr 20, 2020

Copy link to clipboard

Copied

Here I wrote a script for you to be used in the batch processor:

main();

function main() {
	var doc = app.activeDocument;

	// Relink to the customer logo located in the same folder
	var logo = doc.links.itemByName("logo.ai");
	if (logo.isValid) {
		var logoCustomerFilePath = File(logo.filePath).path + "/logo_customer.ai";
		var logoCustomerFile = new File(logoCustomerFilePath);
		if (logoCustomerFile.exists) {
			logo.relink(logoCustomerFile);
		}
	}
	
	// Edit a swatch
	var swatch = doc.swatches.itemByName("C=15 M=100 Y=100 K=0");
	if (swatch.isValid) {
		with (swatch) {
			colorValue = [30, 90, 90, 10];
		}
	}

	// Export to PDF to the same location as INDD
	var pdfFilePath = doc.fullName.absoluteURI.replace(/indd$/, "pdf");
	var pdfFile = new File(pdfFilePath);
	var pdfPreset = app.pdfExportPresets.itemByName("[Press Quality]");
	var pdfFileExported = doc.exportFile(ExportFormat.PDF_TYPE, pdfFile, false, pdfPreset);
	
	// Save as a copy
	var docFilePath = doc.filePath.absoluteURI;
	var newDocPath = docFilePath + "/" + doc.name.replace(/\.indd$/, "") + "_customer.indd";
	var newDoc = new File(newDocPath);
	doc.saveACopy(newDoc);
}

I don't know your specific requirements so adjust it to your needs. or use it as a starting point.

2020-04-20_19-04-34.png

Hope it helps!

— Kas

Likes

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
Reply
Loading...
Apr 20, 2020 2