3 Replies Latest reply on Dec 5, 2012 7:26 PM by David W. Goodrich

    Metadata and ePub export and custom XMP fields...

    TᴀW Adobe Community Professional & MVP

      Hi,

       

      Does anyone know of a way to add metadata apart from the fields that

      already are available in the ePub export dialog and XMP panels? The

      iBookstore requires a bunch of stuff that I can't find any place to add.

       

      This trial script that I've put together does add an entry to the DC

      metadata (as you'll be able to see in the XMP panel), but it is not

      retained when the InDesign document is exported. (I believe that it was

      from Tomaxxi's website that I got quite a lot of help for the script.)

       

      If I don't get any answers here I'll take this over to the scripting forum.

       

      Thanks,

      Ariel

       

      PS I hope the following script comes through ok. I've got to post this

      via email, which often mangles things. Apologies in advance if that is

      the case.

       

      myDocXMP = app.activeDocument.metadataPreferences;

      destNamespace = "http://purl.org/dc/elements/1.1/";

      destContName = "ArielsContainer";

      destNodeName = "ArielsSpecialMetdataField";

      nodeValue = "Great ePub!" ;

      myDocXMP.createContainerItem(destNamespace, destContName, undefined,

      ContainerType.ALT);

      myDocXMP.setProperty(destNamespace, destContName+"[1]", nodeValue);

       

        • 1. Re: Metadata and ePub export and custom XMP fields...
          David W. Goodrich Level 3

          I suppose the first thing to confirm is which categories of metadata ID exports to e-pub.  My workhorse is still IDCS4, hardly the basis for serious discussion of e-pub export, but IDCS4 at least seems to put only some basic Dublin Core properties into content.opf: title, subject, description, subject, and rights.  However, I had added some custom metadata categories to my test *.indd file (tagged with character styles in a non-printing story on the opening page), and those survived into the main *.xhmtl. So that avenue might serve as the basis for additional post-ID processing -- which ID e-pubs are said to require anyway.

           

          As for inserting the metadata in ID, I added some PRISM categories to ID's stock XMP via a modification of of the generic info panel that comes with the XMP SDK.  This info exports properly to PDF, where I can see it with Acrobat Pro via the Additional Metadata button on the Properties' Description tab.  (Tomaxxi's very helpful material was the basis for a simple script that copies my non-printing info into proper XMP.)  I was able to move my CS4 panel to a test-bed machine with IDCS5.5, but haven't tried e-pub export there.

           

          Good luck!

          • 2. Re: Metadata and ePub export and custom XMP fields...
            TᴀW Adobe Community Professional & MVP

            Hi David,

             

            Right. I also suspect that ID is "hardwired" to export only specific

            categories of metadata. And even if I can add to the DC metadata, it

            still won't come through on export -- that's my guess. But maybe,

            hopefully, I'm wrong.

             

            The script that I posted does add metadata to the DC category (as can

            been seen under the Advanced tab of the XMP Panel). But it adds it in a

            slightly funny way (as an alt container, and not an alt-text container;

            there's no scripting option that I can see for creating alt-text

            containers, but, on the other hand, I don't know what the difference

            between the two types is). Also, it creates some sort of weird array

            (hence the ).

             

            In short, the script doesn't prove that ID won't export additional

            metadata if it's added in the right way.

             

            I wonder what you mean by "adding custom metadata" in a non-printing

            story? Also, if that ends up in a .xhtml file that's not so useful,

            because we need it to land up in the content.opf file to be of any use,

            I think?

             

            Again, I'm not sure what PRISM categories are. But I did actually

            download the XMP SDK at one point, though I never really explored it. If

            your extra metadata exported to PDF, would it export to ePub as well?

            Did you try exporting with CS4, even if not with CS5.5?

             

            Thanks,

            Ariel

            • 3. Re: Metadata and ePub export and custom XMP fields...
              David W. Goodrich Level 3

              I know too little about e-pub to be a reliable source for information, and my programming skills are rudimentary.  Still, I'd like to think that if one can get useful metadata into an e-pub file then that offers an opportunity for further processing to get where you want to go.

               

              My non-printing story is simply a non-printing text box I put in the margin on the title page of articles with basic DC info: this makes it easy to see on-screen in ID without calling up ID's File Info; I can adjust those details right there, and then use my little *.jsx (based on tomaxxi) to copy them into the actual XMP metadata.  I was surprised that this (non-printing) stuff showed up in a quickie test of ID's e-pub export, but as I say my character styles survived so that quirk could be useful.

               

              PRISM provides a metadata standard for publishing that includes bibliographic details omitted from the Dublin Core, stuff needed for academic citations, such as an article's starting and ending pages.  Some publishers (e.g., the Nature Group) think this is worth including in their journal's PDF metadata, and some bibliographic programs (e.g., Zotero) use it.  I figure even if PRISM goes the way of Betamax, anyone who cares can quickly convert my XML-based info to some other bibliographic standard.

               

              David