JavaScript and Metadata

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default JavaScript and Metadata

    Hello,

    I'd like to know whether the following is possible. It would also be great if someone could be point me in the right directions regarding the appropriate API functions / keywords.

    We set up a LiveCycle server that dynamically creates 3D PDFs out of CAD files. Now we also would like to dynamically add metadata (3D coordinates, strings,...) to the PDF. This PDF is then sent to the client that is using Adobe Reader.

    The JavaScript code that is embedded into the file as well should interpret the metadata and control some behavior in accordance. The client is not required to add further meta data to the file as the modified data should be directly fed into our database.

    I assume it is definately possible to add meta data with LiveCycle, but what about the reading of them via JavaScript in the Reader? How can I add meta data to a PDF in Acrobat Pro Extended? I'd like to build some client test case before touching the server. Could you point me to some functions or even tutorials?

    Kind regards
    Maik
    Maik_Schulze@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. Metadata from JPG
      I would like to get the Date Taken from the metadata from a jpg image taken with a digital SLR. Is there any ASP or Java script you are aware of...
    2. Deleting XAP Metadata
      Hi All, Is there any way to delete XAP metadata from Plug-in? I'm not able to find any API to delete metadata. Thanks, Somnath
    3. Metadata
      Is there any metadata scrubber utility available from Adobe or third party? Thanks in advance
    4. Metadata help
      I am looking for a way to lock and hide metadata on files that I upload to website. I add metadata for copyright, description and keywords (for my...
    5. Metadata from Word XP
      Aandi, I can find the %%EOF using Notepad, but if I edit the file and save, the file is not longer a PDF. What program can I use to remove...
  3. #2

    Default Re: JavaScript and Metadata

    Are you talking about metadata at the document level? On the 3D object itself? Or on specific "objects" inside the 3D data?

    PDF supports all of these things, but creating/editing/retrieving the metadata for each is different...
    Leonard_Rosenthol@adobeforums.com Guest

  4. #3

    Default Re: JavaScript and Metadata

    Hello Leonard,

    I'm talking about metadata at the document level. There is no immmediate relation to 3d nodes or the 3d context at all.

    Regards
    Maik
    Maik_Schulze@adobeforums.com Guest

  5. #4

    Default Re: JavaScript and Metadata

    look at the doc object - I think it's getInfo and setInfo.
    Leonard_Rosenthol@adobeforums.com Guest

  6. #5

    Default Re: JavaScript and Metadata

    Hello Leonard,

    thank you for pointing me into the right direction. When working on document.info I discovered that document.metadata might do the trick as well and supports structures and not just value pairs.

    The example in the documentation really helped me getting started. Unfortunately I'm a little bit stuck. I defined my own XMP namespace and an according XML structure. I have trouble querying the data. Most queries produce an empty string.

    Is there a tutorial that shows how to read property qualifiers and alternatives?

    Let's take this as an example:

    [...]
    <dc:rights>
    <rdf:Alt>
    <rdf:li xml:lang="x-default">English</rdf:li>
    <rdf:li xml:lang="ger">German</rdf:li>
    </rdf:Alt>
    </dc:rights>
    [...]

    Querying it as following
    var p = [...]mydc::rights.myrdf::Alt.myrdf::li;
    results in "p = English"
    How can I read the German alternative? Can somebody point me to an appropriate tutorial? I have similar problems with sequence structures and qualifiers.

    Regards
    Maik
    Maik_Schulze@adobeforums.com Guest

  7. #6

    Default Re: JavaScript and Metadata

    language alternates aren't well handled at the higher levels. You'd be best to use the E4X features of JavaScript to get to them at the "raw" XML level if yo ureally need it.
    Leonard_Rosenthol@adobeforums.com Guest

  8. #7

    Default Re: JavaScript and Metadata

    Leonard,

    you mentioned, that creating/editing/retrieving of metadata is also possible for 3d objects.

    How does this work? I only find, that the metadata string of a mesh in a scene is read only. How can I add a metadata string or edit existing metadata?

    Is it correct, that this metadata will be displayed by the "Object Data Pane"?

    A plugin solution would also be ok. I am investigating Acrobat version 8.1 and 9.

    Ulrike
    ulrike73@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139