02-25-2014 11:49 AM
Hi all,
I would like to pull select properties from my tdm files and embed them in the XMP metadata stream in the exported pdf file in order to improve integration with a document management system. Does anyone know of a way to do this without writing a XML parser from scratch?
Thanks.
02-26-2014 06:24 PM
Hi testingHotAir,
I don’t think there’s any way to do this directly through DIAdem. That is, the Report doesn’t contain any options or properties that I can find to edit the metadata that would be exported to the PDF...
Kelsey Johnson
Applications Engineer
02-27-2014 05:46 AM
TestingHotAir
This seemed interesting so, looked up ways to alter the XMP file from vbscript, (which can be ran from DIAdem after the Pdf is made.)
and put values from DIAdem's data portal into XMP meta information.
The script below looks like it could be modified to do what you want.
Paul
set xmp = CreateObject("Chilkat.Xmp")
success = xmp.UnlockComponent("Anything for 30-day trial.")
If (success <> 1) Then
MsgBox xmp.LastErrorText
WScript.Quit
End If
' The first step is to create a new XMP document, which is nothing
' more than XML. The NewXmp method returns an XML document with
' the standard XMP boilerplate.
' xml is a Chilkat.Xml
Set xml = xmp.NewXmp()
' Add some properties...
success = xmp.AddSimpleStr(xml,"Iptc4xmpCore:Chilkat","Blah blah")
' If you wish to view the XML, save it to a file and review it
' with a text editor:
success = xml.SaveXml("newXmp.xml")
If (success <> 1) Then
MsgBox xml.LastErrorText
WScript.Quit
End If
' To add the XMP to the JPG (or TIFF), simply load the JPG,
' append the XMP, and save:
success = xmp.LoadAppFile("scream.jpg")
If (success <> 1) Then
MsgBox xmp.LastErrorText
WScript.Quit
End If
success = xmp.Append(xml)
If (success <> 1) Then
MsgBox xmp.LastErrorText
WScript.Quit
End If
success = xmp.SaveAppFile("screamOut.jpg")
If (success <> 1) Then
MsgBox xmp.LastErrorText
WScript.Quit
End If
02-28-2014 02:05 PM
Thanks Pesmith8.
Unfortunately it seems that library only handles xmp data for tiff and jpeg files, not pdfs. I'm still looking for a similar tool that would support pdf. I'm kinda surprised there isn't one shipped with Acrobat Pro (which I have).