Class ProfileComplianceException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ProfileComplianceException
    extends java.lang.IllegalStateException

    This exception is thrown when an action is not allowed based on the OutputProfile that is applied to the PDF - for example, if the PDF only allows CMYK colors and an attempt is made to add RGB to the page.

    Prior to 2.24.3 this situation resulted in an IllegalStateException - for compatibility this class extends that exception type, but with additional information.

    Since:
    2.14
    See Also:
    PDFReader.setSource(java.net.URL), LoadState, Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDetail()
      Return any additional detail on the fault.
      OutputProfile.Feature getFeature()
      Return the Feature that failed
      org.xml.sax.Locator getLocator()
      Return the locator of this exception, as set by setLocator(org.xml.sax.Locator)
      void setDetail​(java.lang.String detail)
      Set additional detail on the fault.
      void setLocator​(org.xml.sax.Locator locator)
      Set the source of this exception as a Locator.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProfileComplianceException

        public ProfileComplianceException​(java.lang.String msg,
                                          OutputProfile.Feature feature,
                                          boolean denied)
        Create a nwe ProfileComplianceException
        Parameters:
        msg - the message
        feature - the feature that is disallowed or required
        denied - if true, the feature was denied in the source profile
    • Method Detail

      • setDetail

        public void setDetail​(java.lang.String detail)
        Set additional detail on the fault.
      • getDetail

        public java.lang.String getDetail()
        Return any additional detail on the fault.
      • setLocator

        public void setLocator​(org.xml.sax.Locator locator)
        Set the source of this exception as a Locator. This Locator doesn't have to represent an XML file, it's just a convenient method of storing a filename (the system id), line number and column number.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable