[CS3 JS] Possible to Inspect Custom XMP Metadata With JavaScript?

I am using custom XMP metadata in InCopy and InDesign docs in CS3 to hold custom metadata that can vary wildly. I know the full set of possible items but not what values will be in a particular document.
Short of writing the XMP to a file and then processing that from my script, is there a way to inspect the custom properties from JavaScript. I didn't see a way to do it from the data model.
Thanks,
Eliot

Here is another script to catch MetaData, some more than the basic:
// metaDataOfLinks.jsx
//DESCRIPTION: Catches MetaData of linked images and creates a report at the DeskTop.
// Martin Fischer 10/2008
var myLinkXmpArray = ["author", "copyrightInfoURL", "copyrightNotice", "copyrightStatus   ", "creationDate", "creator", "description", "documentTitle", "format", "jobName", "keywords", "modificationDate", "serverURL"];
var myIPTCArray = ["CiAdrCity", "CiAdrCtry", "CiAdrExtadr", "CiAdrPcode", "CiAdrRegion", "CiEmailWork", "CiTelWork", "City", "CiUrlWork", "CopyrightNotice", "Country", "CountryCode", "Creator", "CreatorContactInfo", "CreatorJobtitle", "DateCreated", "Description", "DescriptionWriter", "Headline", "Instructions", "IntellectualGenre", "JobID", "Keywords", "Location", "Provider", "Province-State", "RightsUsageTerms", "Scene", "Source", "SubjectCode", "Title"];
var myPSArray = ["photoshop:AuthorsPosition", "photoshop:CaptionWriter", "photoshop:Category", "photoshop:City", "photoshop:Country", "photoshop:Credit", "photoshop:DateCreated", "photoshop:Headline", "photoshop:Instructions", "photoshop:Source", "photoshop:State", "photoshop:SupplementalCategories", "photoshop:TransmissionReference", "photoshop:Urgency"];//var myPSArray = ["photoshop:AuthorsPosition", "CaptionWriter", "Category", "City", "Country", "Credit", "DateCreated", "Headline", "Instructions", "Source", "State", "SupplementalCategories", "TransmissionReference", "Urgency"];
var myTiffArray = ["tiff:ImageWidth", "tiff:ImageLength", "tiff:BitsPerSample", "tiff:Compression", "tiff:PhotometricInterpretation", "tiff:Orientation", "tiff:SamplesPerPixel", "tiff:PlanarConfiguration", "tiff:YCbCrSubSampling", "tiff:YCbCrPositioning", "tiff:XResolution", "tiff:YResolution", "tiff:ResolutionUnit", "tiff:TransferFunction", "tiff:WhitePoint", "tiff:PrimaryChromaticities", "tiff:YCbCrCoefficients", "tiff:ReferenceBlackWhite", "tiff:DateTime", "tiff:ImageDescription", "tiff:MakeProperName", "tiff:Model", "tiff:Software", "tiff:Artist", "tiff:Copyright"];
var myExifArray = ["exif:ExifVersion", "exif:FlashpixVersion", "exif:ColorSpace", "exif:ComponentsConfiguration", "exif:CompressedBitsPerPixel", "exif:PixelXDimension", "exif:PixelYDimension", "exif:UserComment", "exif:RelatedSoundFile", "exif:DateTimeOriginal", "exif:DateTimeDigitized", "exif:ExposureTime", "exif:FNumber", "exif:ExposureProgram", "exif:SpectralSensitivity", "exif:ISOSpeedRatings", "exif:OECF", "exif:ShutterSpeedValue", "exif:ApertureValue", "exif:BrightnessValue", "exif:ExposureBiasValue", "exif:MaxApertureValue", "exif:SubjectDistance", "exif:MeteringMode", "exif:LightSource", "exif:Flash", "exif:FocalLength", "exif:SubjectArea", "exif:FlashEnergy", "exif:SpatialFrequencyResponse", "exif:FocalPlaneXResolution", "exif:FocalPlaneYResolution", "exif:FocalPlaneResolutionUnit", "exif:SubjectLocation", "exif:ExposureIndex", "exif:SensingMethod", "exif:FileSource", "exif:SceneType", "exif:CFAPattern", "exif:CustomRendered", "exif:ExposureMode", "exif:WhiteBalance", "exif:DigitalZoomRatio", "exif:FocalLengthIn35mmFilm", "exif:SceneCaptureType", "exif:GainControl", "exif:Contrast", "exif:Saturation", "exif:Sharpness", "exif:DeviceSettingDescription", "exif:SubjectDistanceRange", "exif:ImageUniqueID", "exif:GPSVersionID", "exif:GPSLatitude", "exif:GPSLongitude", "exif:GPSAltitudeRef", "exif:GPSAltitude", "exif:GPSTimeStamp", "exif:DateTimeOriginal,", "exif:DateTimeDigitized.", "exif:GPSTimeStamp", "exif:GPSSatellites", "exif:GPSStatus", "exif:GPSMeasureMode", "exif:GPSDOP", "exif:GPSSpeedRef", "exif:GPSSpeed", "exif:GPSTrackRef", "exif:GPSTrack", "exif:GPSImgDirectionRef", "exif:GPSImgDirection", "exif:GPSMapDatum", "exif:GPSDestLatitude", "exif:GPSDestLongitude", "exif:GPSDestBearingRef", "exif:GPSDestBearing", "exif:GPSDestDistanceRef", "exif:GPSDestDistance", "exif:GPSProcessingMethod", "exif:GPSAreaInformation"];
var myCameraRawArray = ["crs:AutoBrightness", "crs:AutoContrast", "crs:AutoExposure", "crs:AutoShadows", "crs:BlueHue", "crs:BlueSaturation", "crs:Brightness", "crs:CameraProfile", "crs:ChromaticAberrationB", "crs:ChromaticAberrationR", "crs:ColorNoiseReduction", "crs:Contrast", "crs:CropTop", "crs:CropLeft", "crs:CropBottom", "crs:CropRight", "crs:CropAngle", "crs:CropWidth", "crs:CropHeight", "crs:CropUnits", "crs:Exposure", "crs:GreenHue", "crs:GreenSaturation", "crs:HasCrop", "crs:HasSettings", "crs:LuminanceSmoothing", "crs:RawFileName", "crs:RedHue", "crs:RedSaturation", "crs:Saturation", "crs:Shadows", "crs:ShadowTint", "crs:Sharpness", "crs:Temperature", "crs:Tint", "crs:ToneCurve", "crs:ToneCurveName", "crs:Version", "crs:VignetteAmount", "crs:VignetteMidpoint", "crs:WhiteBalance"];
var myInfo = new Array;
var myDoc = app.activeDocument;
var myLinks = app.documents[0].links;
for ( i = 0; i < myLinks.length; i++)
   getMetaData ( myLinks[i] );
writeData ( 'Metadaten zu ' + myDoc.name + '\r-----------\r\r' + myInfo.join ( '\r\r'), File ('~/Desktop/Metadaten_' + myDoc.name.replace(/.indd$/, '') + '.txt'));
// ===============================================================
//                                  Funktionen
// ===============================================================
function getMetaData ( aLink )
   var myLinkXmp = aLink.linkXmp.properties.toSource().replace( /^\(\{/,'' ).replace (/\)\}$/,'').replace( /parent.+$/,'').replace(/:/g, ':\t').split( ', ');
   var myString = aLink.name;
   myString += loopLinkXmp ( aLink, myLinkXmpArray );
   myString += loopArray ( aLink, "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/",  "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:",  myIPTCArray);
   myString += loopArray ( aLink, "http://ns.adobe.com/photoshop/1.0/",  "", myPSArray );
   myString += loopArray ( aLink, "http://ns.adobe.com/tiff/1.0/", "", myTiffArray );
   myString += loopArray ( aLink, "http://ns.adobe.com/exif/1.0/", "", myExifArray );
   myString += loopArray ( aLink, "http://ns.adobe.com/camera-raw-settings/1.0/",  "", myCameraRawArray );
   myInfo.push( myString.replace( /, $/,'') );
function loopArray( aLink, s1, s2, anArray )
   var temp = '\r\t--- ' + s1 + ' ---\r\t';
   for ( var a = 0; a < anArray.length; a++)
      try {
         var theEvalString = 'aLink.linkXmp.getProperty(\"' + s1 + '\", \"' + s2 + anArray[a] + '\")';
         var myCode = eval( theEvalString );
         if ( myCode != '' )
            temp += '[' + anArray[a] + ']\t' +  myCode + '\r\t'; 
      } catch (e){ //temp +=e + '\r'
   return temp;
function loopLinkXmp( aLink, anArray )
   var temp = '\r\t--- LinkMetadata ---\r\t';
   for ( var a = 0; a < anArray.length; a++)
      try {
         var theEvalString = 'aLink.linkXmp.' + anArray[a] ;
         var myCode = eval( theEvalString );
         if ( myCode != '' )
            temp += '[' + anArray[a] + ']\t' +  myCode + '\r\t'; 
      } catch (e){ //temp +=e + '\r'
   return temp;
function writeData ( aData, theFile )
   theFile.open ( 'w', 'Text', 'R*ch' );
   theFile.encoding = 'UTF-8';
   theFile.write ( aData );
   theFile.close ();
Ressources:
Adobe XMP Developer Center: http://www.adobe.com/devnet/xmp/
XMP Specification: http://www.adobe.com/devnet/xmp/pdfs/xmp_specification.pdf
Martin Fischer

Similar Messages

  • Exporting/Sharing Custom XMP metadata schema not possible?

    I've written a Python script which automatically encodes Quicktime files which I've mastered out of Premiere Pro CC with embedded custom XMP metadata (created using "New Schema" in the Metadata Display panel). I'm using the embedded custom metadata to drive the Python script (e.g. "Spot Title", "Client Name", fields etc etc), which encodes the source QT file to several different formats, based on the delivery specifications of various local TV broadcasters which the encoded files will go to.
    Everything about the XMP metadata entry/writing/parsing is fantastic. My only hitch is in the exporting/sharing of the custom metadata schema which I created for this purpose. I would like to roll the schema out to the other editors in our facility, so that they can also enter the XMP metadata on their own systems when they export out master timelines from Premiere.
    But unless I'm missing something, I can't figure out a way to "share" or export my custom schema for use on another system. Is this not possible in Premiere Pro CC?

    There's no feature for exporting and importing custom schemas, but it's entirely doable. Here are the path to the custom schemas
    MAC: Macintosh HD ▸ Users ▸ <username> ▸ Library ▸ Application Support ▸ Adobe ▸ XMP ▸ Custom File Info Panels ▸ 4.0 ▸ custom
    WIN: C:\Users\AppData\Roaming\Adobe\XMP\custom file info panels\4.0\panels [I can't vouch for this path as I'm on Mac at the moment and it's been ages since I poked around for custom schemas, but this should at least be the right neighborhood.]
    You might also be interested in sharing your custom metadata display profiles. They in Documents ▸ Adobe ▸ Premiere Pro ▸ 8.0 ▸ Profile-mapes ▸ Metadata Preferences.

  • Incrementally appending  custom XMP metadata into PDF files

    I have a problem writing custom XMP metadata into a PDF document (I'm using the XMP Toolkit SDK).
    The problem is that I don't know whether is possible to expand the XMP packet in order to append metadata incrementally into the document, and, if it is possible, I don't know how to do it. The program I wrote succesfully appends an item to an array four times, but it fails when trying to append the fifth one. The reason obviously is that the packet gets full and there is not room for more metadata. The error message, if I force the PutXMP call, is:
    ERROR: Can't fit into specified packet size
    So, what can I do? How to enlarge the packet or make it expandable? Or, otherwise, have I to inject a new XMP packet with the up-to-date information in it? How?
    And a last question: Have I to scan for packets when dealing with PDF files? No smart handlers are available for this kind of files?
    Thanks in advance.
    Xabier Artola.
    Univ. of the Basque Country.

    Were you able to find a solution to this problem? I am having the same issue.
    Jason

  • Custom command for custom XMP metadata

    Hi
    I'm trying to create a custom command for setting and getting custom XMP metadata using InDesign CS3 SDK with Xcode.
    I think I got the step 1) to 3) ok. But not so sure about step 4).
    Please take a look and tell me if I have got anything wrong.
    1) Create 2 classes and 1 interface
    MyCustomMetadata
    MyCustomMetadataSetCmd
    IMyCustomMetadata
    2) Define class definitions in the resource file
    /** Boss class for kMyCustomMetadataBoss */
    Class
    kMyCustomMetadataBoss,
    kInvalidClass,
    IID_IMYCUSTOMMETADATA, kMyCustomMetadataImpl,
    /** Boss class for kMyCustomMetadataSetCmdBoss */
    Class
    kMyCustomMetadataSetCmdBoss,
    kInvalidClass,
    IID_ICOMMAND, kIQAdTicketMetaDataSetCmdImpl,
    IID_IMYCUSTOMMETADATA, kMyCustomMetadataImpl,
    3) Define functions for setting and getting values in MyCustomMetadata
    GetMyTitle()
    SetMyTitle()
    Within these functions, use IMetadataAccess interface to set/get values.
    4) Create Do() function in MyCustomMetadataSetCmd
    ??? I'm not sure what I'm supposed to do here ???
    Any help would be really appreciated.
    Thanks,
    JP

    m41miller42 wrote:
    I am attempting to create a custom RSS file (.mrss) that references XMP metadata from Premiere.
    I was basing the move on this statement. This was posted in the Adobe Connect forums.

  • Incrementally appending custom XMP metadata

    I have a problem writing custom XMP metadata into a PDF document (I'm using the XMP Toolkit SDK).
    The problem is that I don't know whether is possible to expand the XMP packet in order to append metadata incrementally into the document, and, if it is possible, I don't know how to do it. The program I wrote succesfully appends an item to an array four times, but it fails when trying to append the fifth one. The reason obviously is that the packet gets full and there is not room for more metadata. The error message, if I force the PutXMP call, is:
    ERROR: Can't fit into specified packet size
    So, what can I do? How to enlarge the packet or make it expandable? Or, otherwise, have I to inject a new XMP packet with the up-to-date information in it? How?
    And a last question: Have I to scan for packets when dealing with PDF files? No smart handlers are available for this kind of files?
    Thanks in advance.
    Xabier Artola.
    Univ. of the Basque Country.

    One of the known limitations of the XMPToolkit is that it is NOT smart about PDF documents - it treats them as "generic binary" and thus can not add beyond the pre-allocated whitespace already in the PDF.
    If you are doing any serious operations of XMP with PDF - I recommend that you look at licensing the Adobe PDFLibrary which is a full functioning PDF library and incorporates the XMPToolkit inside it (among many other things).

  • CS5 - Live Caption with Custom XMP Metadata?

    (I USE CS5 on WINDOWS 7)
    I currently have a custom panel (witch custom namespace) up and running, and have many of my photos correctly tagged.
    For this example, I opened a new Indesign document, placed a previously tagged JPEG
    Then I right-click the image from the Links panel and select "XMP File Info..."
    I see the custom XMP namespace tab, along with all of the data I previously entered (so I know the image is correctly tagged)
    BUT, when I go to Caption Setup, I only see legacy IPTC options from the metadata dropdown
    Am I missing something here? 

    I'd be interested to know the same thing.  I have metadata stored in a custom XMP namespace, populated through a custom File Info panel.  But I don't see if it's possible to edit the 'Metadata' list in the Live Captions Setup to access these or if it's limited to the default set that I can see when I access the feature?

  • Defining Custom XMP Metadata Fields

    Is it possible (possibly through the export SDK?) to define a custom metadata field that Aperture can access?
    Specifically, Adobe allows Photoshop users to create custom metadata panels to define new XMP namespaces allowing new metadata standards to be entered. This information is saved with the image file, just like the IPTC XMP fields.
    However I am curious if there is any way Aperture can be customized to allow these custom fields to be read and set up as options in the metadata viewer.
    I'm currently involved with a NASA/ESA project to bring more complete metadata annotations to astronomy images, but so far Photoshop/Bridge seem to be the only packages with defined support for custom metadata. It would be fantastic if such fields could be accessed from Aperture too!
    PowerMac G5 2.3GHz   Mac OS X (10.4)  

    Hi Robert,
    Talk about timing! I just finished coding an export plugin for Aperture to do XMP metadata (beyond the built-in support that Aperture provides) that I'll be releasing as donation-ware in the next week and know all about this right now
    What you could do is add custom keys within Aperture, define your own XMP namespace, and then, in the plugin, map from your custom keys to the XMP namespace. If you want, drop me an email (joshanon at mac dot com), and I might be able to send you the source to my plugin as a starting point.
    Josh

  • Custom XMP Panel with "pulldowns" in Bridge

    Hello,
    I have a custom XMP panel built that is visible in Photoshop, InDesign, Illustrator, which is nice.
    I can view this custom XMP panel in Bridge as well, however the fields with pulldown menus don't show in Bridge. Being able to use pulldowns is critical for our workflow...AND I want people to be able to use Bridge for metadata entry. Does anyone have a solution for this?
    I want fields with pulldowns in my custom XMP panel to be viewable and editable in Bridge. Help!!
    Thanks
    Rob

    Bridge's metadata panel only supports plain-text fields for custom metadata. See the following article on how to submit and feature request to Adobe via the feature request form:
    http://kb2.adobe.com/cps/800/e8008c68.html
    I assume you already know that you can open the File Info dialog itself directly within Bridge for a selection of one or more files, yes? The same custom File Info panel that appears in Photoshop's File Info panel will appear in Bridge. To open File Info in Bridge, use the File or thumbnail-contextual menus or the keyboard shortcut Cmd+Opt+Shift+I.
    If you really require a highly customized metadata UI right inside the Bridge window (File Info is a modal dialog box), and you are willing to invest some coding effort, then I suggest using Flex Builder to create a custom Flash Panel for Bridge. You will have to take on some non-trivial work to sync up what's displayed/edited in your custom panel with the current selection of Thumbnails, etc., but such a solution should be technically possible. The Bridge Scripting SDK includes example for how to add a Flash panel, how to get your Flash ActionScript and Bridge JavaScript to talk to each other via the Flash External Interface, and how to use the XMPScript API to modify metadata for files. Again, I think the effort required is non-rivial, but Bridge does provide a platform upon which you can build a highly customized solution.
    -David

  • Is it possible to add color context row with javascript?

    Hi,
    Is it possible to add color context rows for a graphic object with javascript?
    Thanks.

    The match syntax changed between version 12.0 and 12.1, so my recommendation to you is to build an iGrid template the way you would like to do it with javascript, then export the display template from the workbench. 
    Open the template in a text editor and observe the format for the MatchValues, MatchColumns, and MatchColors strings.
    Then your javascript will follow the document.APPLET.gridObject().setMatchXXX("xxxx"); as shown in the script assistant.

  • [CS3 JS] How To Access Custom Metadata?

    I have InCopy documents that contain custom XMP metadata in two namespaces, Dublin Core and PRISM, e.g.:<br /><br />    ...<br />    <rdf:Description<br />      rdf:about=""><br />      <dc:format<br />        xmlns:dc="http://purl.org/dc/elements/1.1/">application/x-incopy</dc:format><br />      <dc:title>Chickens and You</dc:title><br />    </rdf:Description><br />    <rdf:Description<br />      rdf:about=""><br />      <prism:publicationName<br />        xmlns:prism="http://prismstandard.org/namespaces/basic/1.2/"<br />        >Poultry Daily</prism:publicationName><br />    </rdf:Description><br />    ...<br /><br />In my JavaScript, I can access the Dublin core values but cannot access the PRISM values and I'm not sure why not.<br /><br />For example, I have this:<br /><br />doc = app.activeDocument;<br />metadata = doc.metadataPreferences;<br /><br />namespaces["dc"] = "http://purl.org/dc/elements/1.1/";<br />namespaces["prism"] = "http://prismstandard.org/namespaces/basic/1.2/";<br /><br />$.writeln("dc:title=" + <br />     metadata.getProperty(namespaces["dc"], <br />          "title/*[1]"))<br />// Returns expected result "Chickens and You"<br /><br />$.writeln("prism:publicationName=" + <br />     metadata.getProperty(namespaces["prism"], <br />          "publicationName/*[1]"))<br />// Returns unexpected empty result, should be "Poultry Daily".<br /><br />If I do metadata.save() I see the PRISM metadata in the saved result:<br /><br />     <rdf:Description rdf:about=""<br />            xmlns:prism="http://prismstandard.org/namespaces/basic/1.2/"><br />         <prism:publicationName>Poultry Daily</prism:publicationName><br />     </rdf:Description><br /><br />So I'm sort of at a loss but I suspect that I don't really understand what the path value should be--I haven't been able to find any clear documentation on what the path is addressing or how its actually interpreted.<br /><br />What am I missing or doing wrong?<br /><br />Thanks,<br /><br />Eliot

    [email protected] wrote:
    > Dude, I started that thread :-)
    Missed that. It's been a long week.
    The problem is this line (probably).
    metadata.getProperty(namespaces["prism"], "publicationName/*[1]")
    You apparently copied the syntax from dc:title in the previous line. dc:title is
    an 'Lang Alt' kind of property which is, effectively, an array. Your
    prism:publicationName is a simple value property. I suspect that the "[1]"
    syntax (and possible the "/*" before it) are what's causing problems.
    I don't recall seeing docs for this either.
    -X

  • Ideas about viewing/displaying XMP metadata from Reader ?

    Hi,
    We are using Acrobat 9 to add XMP metadata to PDF documents.
    These documents are viewed by the others employees with Acrobat Reader.
    Since "File->Properties->Advanced Metadata" and "Custom Info Panels" are not available in Reader, how can we display XMP metadata ?
    Do you know some ways or plug-ins to do this ?
    Our custom XMP metadata schema have more than 20 fields, so I don't want to put all these informations in the "Keywords" field of the document properties.
    Any idea would be greatly appreciated !
    Thank you !

    Michael... what you are describing above is not accurate.  The iPod Classic does NOT have the capability of using the "Album Artist" field from iTunes to sort music.  This particular metadata field is not even available to the iPod Classic.  Only the "Artist" field is available.  (It is the other way around with the iPod Touch, iPhone, and Ipad -- for these iOS devices, the "Album Artist" field is the one that is available, and not the "Artist" field.)  There are numerous posts here in the discussion forums from other folks who are frustrated by the same issue.  The iPod Classic can only sort and group songs together by "Artist" -- that is, the track artist.  And the track artist is often quite different from the album artist.  For example...  I have 29 different Barbra Streisand albums in iTunes.  For all of them, the album artist is "Barbra Streisand."  There are several different track artists however.  Most of them are just Barbra Streisand.  But she also does a duet or two on several albums.  So there are track artists like...  "Barbra Streisand with Kim Carnes," and "Barbra Streisand with Barry Gibb," and many more like that.  After syncing to my iPod Classic, when I sort on the iPod's "Artist" field, I get about 25 different iterations of "Barbra Streisand and .... " as the artist.  Yes, "Barbra Streisand" does appear among them.  But the only songs that are listed under "Barbra Streisand" are those that she sang by herself, and where she is the only track artist.  Given the setup of the iPod Classic as it is now, using firmware version 2.0.4, it is NOT possible to use the Album Artist field to sort and group songs together. 

  • Custom xmp in Lightroom?

    I have written a few custom xmp panels that work beautifully in PS, IL, IND, Acrobat, Portfolio etc.. Alas I can't seem to access this info in LR.
    Am i missing some crucial step?
    I have the txt file in the adobe custom xmp panels folder but it is nowhere to be found in Lightroom's workspace.
    Thanks.
    a

    I have also experimented with customized XMP data with Bridge and found it quite powerful and useful. You do need to work with a bit of Javascript to do this, but this is not too difficult to learn.
    For example, you can create your own namespace (e.g. "http://ns.mynamespace.com/customdata/1.0/"). and then a series of custom fields (e.g. CustomSetting, CustomName, CustomGroup etc.).
    You can then add this namespace and custom fields to any image (except RAW) without affecting any of the existing metadata or the image itself. Once you have this extra metatdata imbedded in images you can use it in a number of other metadata-aware programs for advanced searching or sorting purposes.
    Creating a custom metadata field is better than using an existing metadata field (e.g. IPTC fields) for your own purposes. In this way you are free to define the purpose of these fields without worrying that other programs will mess-up this metadata or choke on your image.
    Regards, Nigel

  • Solution to view XMP metadata in Adobe Reader ???

    Hello,
    I´m trying to find a solution to view the xmp metadata with the adobe reader.
    I know I´m able to view and edit the xmp metadata with adobe acrobat, but is it possible with the adobe reader?
    What version will I need?
    Moreover is it possible to realize two or more panels in one datafile?
    Up to now I need one file for one panel.
    Any suggestions?
    Thanks!

    I've put a PDF at http://nxg.me.uk/temp/part1.pdf This does display/print perfectly OK in both Reader and in OS X Preview.  I presume that the /Root object (254) is inside one of the ObjStm streams (yes?), as (presumably) are the /Page streams and the reference to the /Metadata object, 52.
    Regarding scanning, Part 3 of the XMP spec, Sect 1.2 says "It is always best to use format-aware file parsing when possible. Lacking this information, applications can find XMP packets by scanning the file."  Also, in Sect. 1.2.1, "A file should be scanned byte-by-byte until a valid header is found."   Finally, ISO-32000-1 Sect. 14.3.2, Note 3, says "[The XMP spec] includes a method to embed XML data within non-XML data files in a platform-independent format that can be easily located and accessed by simple scanning rather than requiring the document file to be parsed."  So it would appear that this metadata packet _should_ be found.

  • How to insert xmp metadata into jpeg files?

    Hi
    Is it possible to automatically insert the metadata
    with the script using text extracted from my database.
    I have to insert the metadata into lots of images which are uploaded to a site.
    Thanks
    [signature deleted bu host]

    A scripting tool you may use, although complex, is ImageMagick.  It allows loads of image manipulate but also handles data.
    Another options is DBGallery, which will very easily allow XMP data to be written to hundreds or thousands of files at a time, but not via script (it's a Windows application).  You can see a quick screenshot tour of it's IPTC/XMP capabilities here.
    Hope this helps,
    Glenn
    Developer of DBGallery: The Photo DATAbase

  • Is it possible to downsample an image with javascript?

    A colleague of mine has created a PDF with functionality in place to allow the user to add pictures into predetermined locations in the document.  His concern is that without the ability to downsample these photos automatically, the users may end up attaching photos from their 10+ MP cameras and this would result in enormous PDF documents.
    Is it possible to downsample these images automatically with javascript?  The dimensions of the images can remain unchanged, but the resolution must reduce to bring down the potential size of the resulting PDF.
    Any advice or pointers would be welcome.
    Thank you

    Are there any other options you can think of to accomplish this using the Acrobat API and not necessarilly using javascript exclusively?  Could a plug-in accomplish this?

Maybe you are looking for