Esko Logo Back to Esko Support
Choose your language for a machine translation:

 

Description

There are many ways to create SmartNames to return the ink names in a file. This is a fairly simple way to create Ink Name SmartNames using only one XMP XPath SmartName.

Procedure

Follow the steps given below to create Ink Name SmartNames:

  1. In the SmartNames view of Automation Engine, click the checkbox on the right side of the window to Resolve All Using: A file.

  2. In the Select File window, choose an example file to use to make the SmartNames. Choose a PDF file (or Adobe® Illustrator® file saved with PDF compatibility) that is similar to files typically used in jobs. 
  3. Back in the SmartNames view, click the button to create a new SmartName. In the New SmartName window, choose type as XMP XPath Query.
  4. Click Edit to enter the XPath Builder. This is where you can build XPath queries very easily by simply clicking the piece of information you need. For more information, visit the documentation here: XPath Builder
  5. Scroll through the XMP information until you find the ink information. Click on any ink name to have the XPath Builder create an XPath Expression for the ink information for that individual ink. You should see an XPath Expression in the top of the window similar to this: 

    /*[local-name() = 'xmpmeta']/*[local-name() = 'RDF']/*[local-name() = 'Description'][1]/*[local-name() = 'inks']/*[local-name() = 'Seq']/*[local-name() = 'li'][1]/*[local-name() = 'name']/text()

    Notice that one match is found. This XPath Expression does exactly what we asked it to do, but we need it to find more than one ink, we need it to find all of the ink names.

    You can select the Use Prefixes option in the toolbar on the right side of the XPath Builder, to change the way the XPath Expression is displayed to a more readable format. This is optional, but may make the expression easier to understand and the screenshot displays an example of this option. This does not affect the functionality of the SmartName and the same instructions apply whether this option is used or not.
  6. Look in the XPath Expression at the top of the window. This text is editable and it needs to be changed to account for all inks. Look for an index in the XPath Expression (a number contained within square brackets, such as [1]) immediately following the "li" element. This number is the ink number that you have currently selected. This index tells the XPath that we want the first ink (if the number is a one). Select the index, including the brackets and remove them from the XPath Expression to make the expression look at any ink regardless of position and press Enter or Return on your keyboard. You should now see that multiple matches are found, as now all ink names are selected. You can also visually check to see if the XPath Expression now works by scrolling through the XMP and verifying that the ink names are now all highlighted. Click OK to exit the XPath Builder.

    You may see two indexes. The last index in the XPath Expression is the one that must be removed remove to have the Expression choose all inks. The first index simply means there are multiple rdf:Description elements depending on how the PDF file was created. Different programs can write different XMP data to the file and in possibly different orders, but there will be only one Description element containing ink information. Therefore, to accommodate any file that may come through, it is a best practice to remove both indexes, in the event that a different PDF file may have the ink information stored in the second Description element. This way, the XPath Expression will find the ink information regardless of where it occurs in the XMP.



  7. This SmartName will now return all of the ink names in the document, as you can see in the Result in the bottom of the SmartName window. In the Separator: field, add a comma (,) to separate each ink name with a comma. Click Save and give your new SmartName a descriptive name and description. Now, you have one SmartName with all of the ink names. 
  8. Click the button to create a new SmartName and choose type StringExtract. Click the button to insert a SmartName and insert the SmartName with all of the ink names. 
  9. In the bottom of the SmartName window, choose the option to Extract Part: Use separation character, using a comma as the separation character. The String Part will now reflect the ink index. By choosing 1 in String Part, you can save this as Ink Name 1

  10. Repeat steps 8 and 9 to create SmartNames for all of the inks you may have.
Article information
Applies to

Automation Engine all versions

Created14-Dec-15
Last revised17-Mar-17
AuthorDAPL
Case Number00569067
Contents