Show Pantones Used In Design/File

Post Reply
bschlitt11
Newbie
Posts: 1
Joined: Thu Sep 29, 2016 4:31 am

Show Pantones Used In Design/File

Post by bschlitt11 » Thu Sep 29, 2016 4:36 am

I am wondering if there is a way to generate the Pantones used in a design/file.

I am not wanting to see for myself or identify where they are used, ( I know how to do that )...
I'm wanting to show my customer the PDF proof/layout with the Pantones listed.

I can do it manually by drawing boxes and labeling the Pantones, but just wondering if there's an automated way to generate what colors are used in the design. Thanks in advance

loicaigon
Advanced member
Posts: 221
Joined: Wed Jul 10, 2013 10:22 am

Re: Show Pantones Used In Design/File

Post by loicaigon » Thu Sep 29, 2016 3:03 pm

Hi,

I did write a little snippet for you here but it might need to be adjusted:

Code: Select all

Array.prototype.contains =  function ( object )
{
	var i = 0, n = this.length;
	
	for ( i = 0 ; i < n ; i++ )
	{
		if ( this[i] === object )
		{
			return true;
		}
	}
	
	return false;
}

var main = function(doc) {
	var clrs = doc.colors.everyItem().getElements(),
	n = clrs.length, clr,
	unused = doc.unusedSwatches, 
	spotLayer = doc.layers.item ( "usedSpots" );
	
	
	spotLayer.isValid && spotLayer.pageItems.everyItem().remove();
	!spotLayer.isValid && spotLayerspotLayer = doc.layers.add ( {name:"usedSpots"});
	!spotLayer.index!=0 && spotLayer.move(LocationOptions.AT_BEGINNING);
	
	var spots = [];
	while ( n-- ) {
		clr = clrs[n];
		if ( clr.model == ColorModel.SPOT && !unused.contains ( clr ) ) {
			spots[ spots.length ] = clr;
		}
	}

	placeSpots ( doc, spots );

}

var placeSpots = function ( doc, aSpots ) {
	var p1 = doc.pages[0],
	pb = p1.bounds,
	tf, 
	tfProps = {
			geometricBounds:[pb[0]-22, pb[1], pb[0]-2, pb[3]], 
			fillColor:"None", 
			strokeColor:"None",
			pointSize:5
	},
	n = aSpots.length,
	table,
	tableProps = {
		 columnCount:2,
		 bodyRowCount:n,
	},
	row, colWidth = Math.abs (pb[3]-pb[1])/3;
	
	var hu = doc.viewPreferences.horizontalMeasurementUnits,
	 vu = doc.viewPreferences.verticalMeasurementUnits;
	 
	 doc.viewPreferences.horizontalMeasurementUnits = doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;
	 tf = doc.textFrames.add( tfProps );
	 tf.textFramePreferences.properties = {
		verticalJustification:VerticalJustification.BOTTOM_ALIGN,
		useFixedColumnWidth:true,
		textColumnCount:3,
		textColumnFixedWidth:colWidth,
	};

	 table = tf.tables.add(tableProps);
	 
	 table.columns[0].width = colWidth*.1;
	  table.columns[1].width = colWidth*.9;
	 while ( n-- ) {
		row  = table.rows[n];
		row.cells[0].fillColor = aSpots[n];
		row.cells[1].contents = aSpots[n].name;
	}

	if ( doc.documentPreferences.slugTopOffset<22 ) {
		doc.documentPreferences.slugTopOffset = 22;
	}

	doc.viewPreferences.horizontalMeasurementUnits = hu;
	doc.viewPreferences.verticalMeasurementUnits = vu;
	 
}

main($doc);
Image

FWIW

Loic
www.ozalto.com

Then use this script as "command" in the INDesign configurator

abailescollins
Member
Posts: 98
Joined: Wed Apr 22, 2015 4:28 pm

Re: Show Pantones Used In Design/File

Post by abailescollins » Thu Oct 06, 2016 1:33 pm

Just for the record, you can do this also in PitStop With the 'Add Separation Names' Action Lists
They are in the 'Add' section of the standard Action Lists.
They add the separation names from each page independently
PitStop Product Manager @ Enfocus.
andrewb@enfocus.com

Post Reply