Examples of PDICCBased


Examples of org.apache.pdfbox.pdmodel.graphics.color.PDICCBased

     * @param pdcs
     *            the color space object to check.
     */
    protected void processICCBasedColorSpace(PDColorSpace pdcs)
    {
        PDICCBased iccBased = (PDICCBased) pdcs;
        try
        {
            ICC_Profile iccp = ICC_Profile.getInstance(iccBased.getPDStream().getByteArray());
            if (iccp == null)
            {
                context.addValidationError(new ValidationError(ERROR_GRAPHIC_INVALID_COLOR_SPACE_ICCBASED,
                        "Unable to read ICCBase color space "));
                return;
            }
            PDColorSpace altpdcs = iccBased.getAlternateColorSpace();
            if (altpdcs != null)
            {
                ColorSpaces altCsId = ColorSpaces.valueOf(altpdcs.getName());
                if (altCsId == ColorSpaces.Pattern)
                {
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.color.PDICCBased

     * @param pdcs
     *            the color space object to check.
     */
    protected void processICCBasedColorSpace(PDColorSpace pdcs)
    {
        PDICCBased iccBased = (PDICCBased) pdcs;
        try
        {
            ICC_Profile iccp = ICC_Profile.getInstance(iccBased.getPDStream().getByteArray());
            if (iccp == null)
            {
                context.addValidationError(new ValidationError(ERROR_GRAPHIC_INVALID_COLOR_SPACE_ICCBASED,
                        "Unable to read ICCBase color space "));
                return;
            }
            List<PDColorSpace> altCs = iccBased.getAlternateColorSpaces();
            for (PDColorSpace altpdcs : altCs)
            {
                if (altpdcs != null)
                {

View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.color.PDICCBased

    private boolean isDeviceIndependent(PDColorSpace cs, ColorSpaceType expectedType)
    {
        boolean result = (cs instanceof PDCalGray || cs instanceof PDCalRGB || cs instanceof PDLab);
        if (cs instanceof PDICCBased)
        {
            PDICCBased iccBased = (PDICCBased) cs;
            try
            {
                ColorSpace iccColorSpace = iccBased.getJavaColorSpace();
                switch (expectedType)
                {
                case RGB:
                    result = (iccColorSpace.getType() == ICC_ColorSpace.TYPE_RGB);
                    break;
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.color.PDICCBased

   *          the list of error to update if the validation fails.
   * @return true if the color space is valid, false otherwise.
   */
  protected boolean processICCBasedColorSpace(PDColorSpace pdcs,
      List<ValidationError> result) {
    PDICCBased iccBased = (PDICCBased) pdcs;
    try {
      ICC_Profile iccp = ICC_Profile.getInstance(iccBased.getPDStream().getByteArray());
      if (iccp == null) {
        result.add(new ValidationError(ERROR_GRAPHIC_INVALID_COLOR_SPACE_ICCBASED, "Unable to read ICCBase color space "));
        return false;
      }
      List<PDColorSpace> altCs = iccBased.getAlternateColorSpaces();
      for (PDColorSpace altpdcs : altCs) {
        if (altpdcs != null) {

          ColorSpaces altCsId = ColorSpaces.valueOf(altpdcs.getName());
          if (altCsId == ColorSpaces.Pattern) {
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.color.PDICCBased

   * @return
   */
  private boolean isDeviceIndependent(PDColorSpace cs, ColorSpaceType expectedType) {
    boolean result =  (cs instanceof PDCalGray || cs instanceof PDCalRGB || cs instanceof PDLab);
    if (cs instanceof PDICCBased) {
      PDICCBased iccBased = (PDICCBased)cs;
      try {
        ColorSpace iccColorSpace = iccBased.getJavaColorSpace();
        switch (expectedType) {
        case RGB:
          result = (iccColorSpace.getType() == ICC_ColorSpace.TYPE_RGB);
          break;
        case CMYK:
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.color.PDICCBased

    private boolean isDeviceIndependent(PDColorSpace cs, ColorSpaceType expectedType)
    {
        boolean result = (cs instanceof PDCalGray || cs instanceof PDCalRGB || cs instanceof PDLab);
        if (cs instanceof PDICCBased)
        {
            PDICCBased iccBased = (PDICCBased) cs;
            try
            {
                ColorSpace iccColorSpace = iccBased.getJavaColorSpace();
                switch (expectedType)
                {
                case RGB:
                    result = (iccColorSpace.getType() == ICC_ColorSpace.TYPE_RGB);
                    break;
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.graphics.color.PDICCBased

     * @param pdcs
     *            the color space object to check.
     */
    protected void processICCBasedColorSpace(PDColorSpace pdcs)
    {
        PDICCBased iccBased = (PDICCBased) pdcs;
        try
        {
            ICC_Profile iccp = ICC_Profile.getInstance(iccBased.getPDStream().getByteArray());
            if (iccp == null)
            {
                context.addValidationError(new ValidationError(ERROR_GRAPHIC_INVALID_COLOR_SPACE_ICCBASED,
                        "Unable to read ICCBase color space "));
                return;
            }
            List<PDColorSpace> altCs = iccBased.getAlternateColorSpaces();
            for (PDColorSpace altpdcs : altCs)
            {
                if (altpdcs != null)
                {

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.