Skip navigation
Currently Being Moderated

How to remove custom labels?

Jul 21, 2009 6:24 AM

I would like to delete a custom label (created with insertlabel) but can't find it anywhere in the much aplauded Adobe documentation .

I am able to delete the label values, but I want to get rid of the keys as well. I normally clean up documents before delivery, including removal of all artefacts and working materials like notes, lowres images and... labels.

How to delete a custom label?

 
Replies
  • Currently Being Moderated
    Jul 21, 2009 8:10 AM   in reply to Tony Tuneson

    This is an entirely different kind of label than the ones I'm used to (the Label property), but some experimenting shows you can 'extract' just about any key you want -- it doesn't give an error if the key is not defined, it just returns an empty string.

    So at least setting the label to an empty string using insertLabel will remove the data part.

     

    Whether or not the key name is still in your document, who knows? Custom labels should be preserved along INX and IDML exports, so you can export a test document and check the resulting file.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 27, 2010 1:21 PM   in reply to Tony Tuneson

    Hi, Tony!

     

    I found that the private label is indeed stored in a IDML file. For example a label set by

     

    app.activeDocument.insertLabel("Uwe","Laubender");

     

    is stored in the designmap.xml part of the IDML file:

     

    <Properties>
            <Label>
                <KeyValuePair Key="Uwe" Value="Laubender"/>
            </Label>
        </Properties>

     

    You can strip those labels from the IDML by deleting the above properties.

     

    Uwe

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2010 12:09 PM   in reply to Laubender

    Thanks for your answer, much appreciated.

    Does this mean I should first save as indx, edit the xml and then re-open/save as indd?

     

    It strikes me that nobody worries about cleaning up their waste after they're done. Why not a "CustomLabels.Count"...

     

    But thanks anyway!

     

    Tony.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points