XmpRightsManagementSchema Class
Stores rights management metadata defined by the XMP Rights Management schema.
Declaration
public class XmpRightsManagementSchema extends JavaObject
Remarks
Use the XmpRightsManagementSchema class to access copyright-related information, including ownership, usage terms, certification, and rights management status.
Refer to the following help topic for additional information: Use XMP Schemas.
The following code snippet creates a Rights Management schema and embeds it into a PDF document:
import com.devexpress.docs.pdf.*;
import java.io.*;
import java.nio.file.*;
public class Main {
public static void main(String[] args) throws Exception {
try (InputStream inputStream = new FileInputStream("Document.pdf");
PdfDocument pdfDocument = new PdfDocument(inputStream)) {
// Create a new XMP metadata packet.
XmpMetadata metadata = new XmpMetadata();
XmpRightsManagementSchema rightsManagementSchema =
metadata.getXmpRightsManagementSchema();
rightsManagementSchema.setCertificate(
new XmpString("https://www.devexpress.com/")
);
rightsManagementSchema.setMarked(new XmpBool(true));
rightsManagementSchema.setWebStatement(
new XmpString("https://www.devexpress.com/support/eulas/")
);
rightsManagementSchema.getUsageTerms().add(
"en-US",
"Copyright(C) 2026 DevExpress. All Rights Reserved."
);
// Embed XMP metadata into the document.
pdfDocument.getMetadata().setXmp(metadata);
// Save the updated document.
try (FileOutputStream outputStream = new FileOutputStream("UpdatedDocument.pdf")) {
pdfDocument.save(outputStream);
}
}
}
}
Inherited Members
Inheritance
Methods
getCertificate() Method
Returns the certificate associated with the document.
Declaration
public XmpString getCertificate()
Returns
| Type | Description |
|---|---|
| XmpString | The URL or identifier of a certificate that validates rights management information. |
getMarked() Method
Returns whether the document contains rights management information.
Declaration
public XmpBool getMarked()
Returns
| Type | Description |
|---|---|
| XmpBool | A value that indicates whether the document is marked as containing rights management metadata. |
getOwner() Method
Returns document owners.
Declaration
public IXmpStringArray getOwner()
Returns
| Type | Description |
|---|---|
| IXmpStringArray | The collection of owners associated with the document. |
getUsageTerms() Method
Returns document usage terms.
Declaration
public IXmpLangAlt getUsageTerms()
Returns
| Type | Description |
|---|---|
| IXmpLangAlt | Language-specific usage terms that describe restrictions or conditions for using the document. |
getWebStatement() Method
Returns the URL of the rights statement.
Declaration
public XmpString getWebStatement()
Returns
| Type | Description |
|---|---|
| XmpString | The URL that provides additional information about document rights. |
setCertificate(XmpString value) Method
Sets the certificate associated with the document.
Declaration
public void setCertificate(XmpString value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | XmpString | The URL or identifier of a certificate that validates rights management information. |
setMarked(XmpBool value) Method
Sets whether the document contains rights management information.
Declaration
public void setMarked(XmpBool value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | XmpBool | A value that indicates whether the document is marked as containing rights management metadata. |
setWebStatement(XmpString value) Method
Sets the URL of the rights statement.
Declaration
public void setWebStatement(XmpString value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | XmpString | The URL that provides additional information about document rights. |