Class XMPHelper


  • public class XMPHelper
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int OUTPUTTYPE_RDF  
    • Constructor Summary

      Constructors 
      Constructor Description
      XMPHelper​(AppModel appModel, byte[] xmp, java.lang.String sDateTime, boolean bAllowTemplateUpdates)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCustomInfo​(java.lang.String sName, java.lang.String sValue)
      Add custom info, as in the Acrobat.DocumentProperties>Custom tab (Stored under xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> namespace)
      static java.lang.String fixupName​(java.lang.String sName)
      Change the name to be a valid XFA name.
      java.lang.String getCustomInfo​(java.lang.String sPropName)
      Retrieve custom info, given the name.
      static byte[] getXMPPacket​(AppModel appModel)  
      java.lang.String getXPATH​(Element oNode)  
      java.lang.String metadata​(int nOutputType)  
      void processDesc​(Element element)  
      void processOtherDesc()  
      void processTemplateDesc()  
      void processXMP()  
      void putPDFAdata​(int iPart, java.lang.String sConformance, java.lang.String sAmendment)  
      void setCreatorTool​(java.lang.String sCreatorTool, boolean bForceApply)  
      void setProducer​(java.lang.String sProducer, boolean bForceApply)  
      void synchronize​(boolean bUpdateXMPPacket)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMPHelper

        public XMPHelper​(AppModel appModel,
                         byte[] xmp,
                         java.lang.String sDateTime,
                         boolean bAllowTemplateUpdates)
                  throws XMPException
        Throws:
        XMPException
    • Method Detail

      • getXMPPacket

        public static byte[] getXMPPacket​(AppModel appModel)
      • getXPATH

        public java.lang.String getXPATH​(Element oNode)
      • fixupName

        public static java.lang.String fixupName​(java.lang.String sName)
        Change the name to be a valid XFA name. Replace all illegal XFA name characters with underscore and ensure name does not start with a underscore.
      • setCreatorTool

        public void setCreatorTool​(java.lang.String sCreatorTool,
                                   boolean bForceApply)
                            throws XMPException
        Throws:
        XMPException
      • setProducer

        public void setProducer​(java.lang.String sProducer,
                                boolean bForceApply)
                         throws XMPException
        Throws:
        XMPException
      • putPDFAdata

        public void putPDFAdata​(int iPart,
                                java.lang.String sConformance,
                                java.lang.String sAmendment)
      • addCustomInfo

        public void addCustomInfo​(java.lang.String sName,
                                  java.lang.String sValue)
                           throws XMPException
        Add custom info, as in the Acrobat.DocumentProperties>Custom tab (Stored under xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> namespace)
        Parameters:
        sName - tag name
        sValue - tag value
        Throws:
        XMPException
      • getCustomInfo

        public java.lang.String getCustomInfo​(java.lang.String sPropName)
                                       throws XMPException
        Retrieve custom info, given the name. Returns The value if a name/value pair was found. Returns null if no such name/value pair was found
        Parameters:
        sPropName - property name
        Returns:
        the value if a name/value pair was found otherwise null
        Throws:
        XMPException