Package org.apache.pdfbox.preflight.exception

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


            return this.encoding.getName(cid);
        }
        catch (IOException e)
        {
            // shouldn't occur
            throw new ValidationException("Unable to check Widths consistency", e);
        }
    }
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

    {

        List<XMPSchema> schemas = metadata.getAllSchemas();
        if (schemas.size() == 0)
        {
            throw new ValidationException("Schemas not found in the given metadata representation");
        }
       
        String about = schemas.get(0).getAboutValue();
      
        // rdf:description must have an rdf:about attribute
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

    {
        List<ValidationError> ve = new ArrayList<ValidationError>();

        if (document == null)
        {
            throw new ValidationException("Document provided is null");
        }
        else
        {
            PDDocumentInformation dico = document.getDocumentInformation();
            if (metadata == null)
            {
                throw new ValidationException("Metadata provided are null");
            }
            else
            {
                DublinCoreSchema dc = metadata.getDublinCoreSchema();
View Full Code Here

     */
    protected ValidationException formatAccessException(String type, String target, Throwable cause)
    {
        StringBuilder sb = new StringBuilder(80);
        sb.append("Cannot treat ").append(type).append(" ").append(target).append(" property");
        return new ValidationException(sb.toString(), cause);
    }
View Full Code Here

     */
    protected ValidationException SchemaAccessException(String target, Throwable cause)
    {
        StringBuilder sb = new StringBuilder(80);
        sb.append("Cannot access to the ").append(target).append(" schema");
        return new ValidationException(sb.toString(), cause);
    }
View Full Code Here

        {
            return clazz.newInstance();
        }
        catch (InstantiationException e)
        {
            throw new ValidationException(processName + " can't be created", e);
        }
        catch (IllegalAccessException e)
        {
            throw new ValidationException(processName + " can't be created", e);
        }

    }
View Full Code Here

                result.add(createActionManager(ctx, COSUtils.getAsDictionary(aDict, cosDocument), additionActionKey));
            }
        }
        else
        {
            throw new ValidationException("Action entry isn't an instance of COSDictionary");
        }
    }
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.