Is there a proper way to store information within a InDesign document?
I would like my InDesign extension to be able to synchronizes data between a document, and an online database. So in order to do this I would like to store a copy of that database directly in the document most likely in an XML string.
The reason I'd like to embed it in the document is that I want people to be able to share documents and not loose that data.
I've looked at labels which seemed to answer this need:
But from what I've gathered around the internet, there is a size limitation of 4,854 bytes for a label. While it might be enough for most cases I can easily see the XML being too big.
Is there another way of storing data within a document?
Or do you see another approach to this problem?
Thanks in advance for your help.
Wow. That's a lot of data.
1) You can compress the data and store it as a binary string in the label. That might give you more capacity.
2) You can split the string and store it in multiple labels.
Yes, a lot of data!
It's interesting that you can write even more (I wrote about 1 Mb),
but everything over 4,854 is flushed during the save.
Maybe that could be an option,
but then he needs to encrypt the data for sure,
because user can easily read the contents of XMP.
Is there any size limitations?
He could just create custom namespace and push the data in.
I don't know of any size limitations (but that might be more a function of my ignorance). We built some tooling into Extension Builder that should greatly simplify this area (including encryption). See Fraser's excellent blog:
Thanks for your help everyone, XMP looks quite interesting, and elegant. And I'm not too concerned about data encryption, I'm not storing anything in there that requires special security.
In most cases labels, would suffice for storing all the info, but I like to be prepared.
I'll look into it after the holidays. Thanks again.