com.cete.dynamicpdf.xmp
Class RightsManagementSchema


Example: This example shows how to create a Rights Management Schema and Add it to the Xmp Metadata.

import com.cete.dynamicpdf.*;
import com.cete.dynamicpdf.xmp.*;
 
public class MyClass{
       public static void main(String args[]){
 
           // Create a PDF Document
           Document document = new Document();
 
           // Add blank pages to the document
           document.getPages().add( new Page( PageSize.LETTER ) );
           document.getPages().add( new Page( PageSize.LETTER ) );	
 
           // Create an Xmp Metadata
           XmpMetadata xmp = new XmpMetadata();
  
           // Rights Management Schema.
           RightsManagementSchema rm = new RightsManagementSchema();
           rm.setMarked2(CopyrightStatus.PUBLICDOMAIN);
	   rm.getOwner().add( "Company Name" );
	   rm.getUsageTerms().addLang( "en-us", "Contact MyCompany" );
	   xmp.addSchema( rm );
           
           // Add the Xmp Metadata to the document
           document.setXmpMetadata( xmp );		
                                         
           // Save the PDF
           document.draw("[PhysicalPath]/MyDocument.pdf");
       }
 }