Skip to main content
Inspiring
July 21, 2009
Question

How to remove custom labels?

  • July 21, 2009
  • 1 reply
  • 1849 views

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?

This topic has been closed for replies.

1 reply

Jongware
Community Expert
Community Expert
July 21, 2009

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.

Inspiring
July 21, 2009

Thanks Jongware, I assume that if you don't know it, it's simply not implemented.

You're also right that it's not the Label property, but it's a helpful feature anyway. I expected it to have Labels.Count etc. but obviously we're left in the dark a bit. Concluding: there is no way to test whether a certain Custom Label exists or not. We can only Extract it's value - if the result is empty we must pretend it's not there.

Community Expert
January 27, 2010

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