I did some tests few months ago, and noticed that storing data through "insertLabel" only allows about 4K of data.
You can add more, but when you save the document, everything over 4K is flushed.
Maybe you can create series of "insertLabel" data keys depending on data length.
1 person found this helpful
You can write XMP data into the document to store as much data as you need.
Thank you Harbs.
XMP data seems to be the way to go.
but for me, it does not look to be a short way. I am not familiar with XMP manipulation from inDesign extension perspective.
I have read the tutorial at
It gives sample usage for Illustrator but no cue for InDesign. Access to XMPString seems different from the InDesign perspective.
sure I will have to learn more around xmp. Does anybody know of a short tutorial or sample code to start with?
In the small and very helpful tutorial from Fraser Gregor called
Handling XMP Metadata with Creative Suite Extension Builder
The sample for Illustrator is quite straitforward.
run()function, add this line to extract the XMP packet from the active Illustrator document:
var xmpPacket:String = app.activeDocument.XMPString;
Create an object to represent our custom art namespace, in the context of the XMP packet:
var context:ArtXMPContext = new ArtXMPContext(xmpPacket);But from InDesign, there is no equivalent to app.activeDocument.XMPString returning an xml string.We must use app.activeDocument.metadataPreferences. This is not returning a string at all.Is there any InDesign equivalent to the Illustrator document.XMPString function?
No. InDesign provides XMP manipulation directly. You use doc.metadataPreferences.setProperty() and doc.metadataPreferences.getProperty()
If you need your own custom namespace, you can either use the method Marijan explains on his blog, or you can use the XMP Namespace Designer that's part of Extension Builder.