Skip navigation
Currently Being Moderated

private data in InDesign document

Apr 13, 2012 5:29 PM

Tags: #data #indesign #xml #private

Hi,

Is there any way to store private data at the document level in an extension?

I need to store persistent xml data at the document level. This data could be larger than 64K in some cases.

I tried to use .insertLabel(key, string) / .extractLabel(key). It works but text gets truncated at around 64K.

This xml data is not meant to be used for tagging and I don't want this data to be accessible via the tag panel. So, without revert to use a plugin, what would be the best approach?

 

thanks in advance for any cue

JeanrLemay

 
Replies
  • Currently Being Moderated
    Apr 15, 2012 2:46 PM   in reply to jeanrlemay

    Hi,

     

    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.

     

    HTH

     

    --

    Marijan (tomaxxi)

    http://tomaxxi.com

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2012 2:59 PM   in reply to jeanrlemay

    You can write XMP data into the document to store as much data as you need.

     

    Harbs

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2012 3:22 PM   in reply to jeanrlemay

    Yes, XMP is much better suggestion than inserting multiple labels!

     

    For more info about XMP check few guides here:

    http://tomaxxi.com/?s=xmp

     

    HTH

     

    --

    Marijan (tomaxxi)

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2012 12:06 AM   in reply to jeanrlemay

    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.

     

    Harbs

     
    |
    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