BasicSchema Object | BasicJobTicketSchema Object | DublinCoreSchema Object | PagedTextSchema Object | RightsManagementSchema Object | Programming with Generator for COM-ActiveX

The XMP (Extensible Metadata Platform) provides a standard format for the creation, processing, and interchange of metadata, for a wide variety of applications. Metadata is data that describes the characteristics or properties of a document. It can be distinguished from the main contents of a document. For example, for a word processing document, the contents include the actual text data and formatting information, while the metadata might include such properties as author, modification date, or copyright status.

In order to make multiple applications able to work effectively with metadata, there must be a common standard that they understand. XMP—the Extensible Metadata Platform—is designed to provide such a standard.

XMP is provided with Schemas: Predefined sets of metadata property definitions that are relevant for a wide range of applications.

 

This example shows how to create an XMP Metadata and add it to the document.

[ASP - VBScript]
Option Explicit
Dim MyDocument, MyPage
						
Set MyDocument = Server.CreateObject( "DynamicPDF.Document" )
Set MyPage = MyDocument.AddPage()
				
' Create an Xmp Metadata
Dim MyXmp 
Set MyXmp = MyDocument.SetXmpMetaData()
						
' Dublin Core Schema.
Dim Mydc
Set Mydc = MyXmp.DublinCore
Mydc.Contributors.Add "Abc" 
Mydc.Contributors.Add "Xyz" 
Mydc.Contributors.Add "Pqrs" 
Mydc.Coverage = "To test all the attributes of schema's provided"
Mydc.Creators.Add "DynamicPDF" 
Mydc.Creators.Add "ceTe Software"
Mydc.Date.Add( Now() )
Mydc.Description.AddLang "en-us", "XMP Schema's test"
Mydc.Identifier = "First XMP pdf"
Mydc.Publisher.Add "DynamicPDF.com"
Mydc.Publisher.Add "ceTe Software" 
Mydc.Relation.Add "Test PDF with XMP" 
Mydc.Rights.DefaultText = "ceTe Software Pvt. Ltd"
Mydc.Rights.AddLang "en-us", "All rights reserved 2007, ceTe software."
Mydc.Source = "XMP Project"
Mydc.Subject.Add "eXtensible Metadata Platform"
Mydc.Title.AddLang "en-us", "XMP" 
Mydc.Title.AddLang "it-it", "XMP - Piattaforma Estendible di Metadata" 
Mydc.Title.AddLang "du-du", "De hallo Wereld" 
Mydc.Title.AddLang "fr-fr", "XMP - Une Platforme Extensible pour les Métédonnées" 
Mydc.Title.AddLang "DE-DE", "ÄËßÜ Hallo Welt" 
Mydc.Type.Add "PDF file containing XMP MetaData"

' Basic Schema.
Set Mydc = MyXmp.BasicSchema
Mydc.Advisory.Add "Date" 
Mydc.Advisory.Add "Contributors" 
Mydc.CreationDate = Now()
Mydc.Nickname = "xyz"

' Mybs.Thumbnails.Add(106, 80, "JPEG", GetImage("C:\thumbnail.jpg"))
						
' Rights Management Schema.
Dim Myrm
Set Myrm = MyXmp.AddRightsManagementSchema
Myrm.Marked = True
Myrm.Owner.Add "DynamicPDF"
Myrm.UsageTerms.AddLang "en-us", "Contact ceTe software."

' Basic Job Ticket Schema.
Dim MyJob
Set MyJob = MyXmp.AddBasicJobTicketSchema
MyJob.JobRef.Add "ceTe", "Xmp Test", "http://www.cete.com/"
MyJob.JobRef.Add "DynamicPDF", "XMP Metadata", "http://www.dynamicpdf.com/"
						
' Paged-Text Schema.
Dim Mypt
Set Mypt = MyXmp.AddPagedTextSchema

' Save the PDF document
MyDocument.DrawToFile "C:\Temp\XMP.pdf"
' Object cleanup
Set MyPage = Nothing
Set MyDocument = Nothing

See Also 

BasicSchema Object | BasicJobTicketSchema Object | DublinCoreSchema Object | PagedTextSchema Object | RightsManagementSchema Object | Programming with Generator for COM-ActiveX