Package org.apache.pdfbox.preflight.exception

Examples of org.apache.pdfbox.preflight.exception.ValidationException


            if (e instanceof ValidationException)
            {
                throw (ValidationException) e;
            }
            // TODO IOException probably due to Encrypt
            throw new ValidationException("Unable to access Annotation", e);
        }
    }
View Full Code Here


                            ContextHelper.validateElement(context, stream, GRAPHIC_PROCESS);
                        }
                    }
                    catch (IOException e)
                    {
                        throw new ValidationException(e.getMessage(), e);
                    }
                }
            }
        }
    }
View Full Code Here

     */
    public final void validate() throws ValidationException
    {
        if (pdcs == null)
        {
            throw new ValidationException("Unable to create a PDColorSpace with the value null");
        }

        this.iccpw = ICCProfileWrapper.getOrSearchICCProfile(context);
        processAllColorSpace(pdcs);
    }
View Full Code Here

                {
                    COSBase gsBase = extGStates.getItem(key);
                    COSDictionary gsDict = COSUtils.getAsDictionary(gsBase, cosDocument);
                    if (gsDict == null)
                    {
                        throw new ValidationException("The Extended Graphics State dictionary is invalid");
                    }
                    listOfExtGState.add(gsDict);
                }
            }
        }
View Full Code Here

            addValidationError(ctx, new ValidationError(ERROR_GRAPHIC_OUTPUT_INTENT_ICC_PROFILE_INVALID,
                    "DestOutputProfile isn't a valid ICCProfile. Caused by : " + e.getMessage()));
        }
        catch (IOException e)
        {
            throw new ValidationException("Unable to parse the ICC Profile.", e);
        }
            }
View Full Code Here

    {

        String type = action.getNameAsString(COSName.TYPE);
        if (type != null && !ACTION_DICTIONARY_VALUE_TYPE.equals(type))
        {
            throw new ValidationException("The given dictionary isn't the dictionary of an Action");
        }

        // ---- S is a mandatory fields. If S entry is missing, the return will
        // return the InvalidAction manager
        String s = action.getNameAsString(COSName.S);
View Full Code Here

                {
                    exploreFields(ctx, acroForm.getFields());
                }
                catch (IOException e)
                {
                    throw new ValidationException("Unable to get the list of fields : " + e.getMessage(), e);
                }
            }
        }
        else
        {
View Full Code Here

                result = constructor.newInstance(ctx, annotDic);
                result.setFactory(this);
            }
            catch (Exception e)
            {
                throw new ValidationException(e.getMessage());
            }
        }
        return result;
    }
View Full Code Here

                }
            }
        }
        catch (IOException e)
        {
            throw new ValidationException("Unable to read a stream to validate it due to : " + e.getMessage(), e);
        }
        finally
        {
            if (ra != null)
            {
View Full Code Here

        {
            context.addValidationError(new ValidationError(e.getErrorCode(), e.getMessage()));
        }
        catch (IOException e)
        {
            throw new ValidationException("Unable to check the ContentStream : " + e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.preflight.exception.ValidationException

Copyright © 2018 www.massapicom. 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.