Package org.apache.pdfbox.preflight.exception

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


    public void validate(PreflightContext context) throws ValidationException
    {
        PreflightPath vPath = context.getValidationPath();
        if (vPath.isEmpty() && !vPath.isExpectedType(PDPage.class))
        {
            throw new ValidationException("Tiling pattern validation required at least a PDPage");
        }

        PDTilingPatternResources tilingPattern = (PDTilingPatternResources) vPath.peek();
        PDPage page = vPath.getClosestPathElement(PDPage.class);
View Full Code Here


    public void validate(PreflightContext context) throws ValidationException
    {
        PreflightPath vPath = context.getValidationPath();
        if (vPath.isEmpty() || !vPath.isExpectedType(PDFont.class))
        {
            throw new ValidationException("Font validation process needs at least one PDFont object");
        }

        PDFont font = (PDFont) vPath.peek();
        FontContainer fontContainer = context.getFontContainer(font.getCOSObject());
        if (fontContainer == null)
View Full Code Here

            // this dictionary will be checked by a CompositeFontValidator
            return null;
        }
        else
        {
            throw new ValidationException("Unknown font type : " + subtype);
        }
    }
View Full Code Here

            return this.encoding.getName(cid);
        }
        catch (IOException e)
        {
            // shouldn't occur
            throw new ValidationException("Unable to check Widths consistency", e);
        }
    }
View Full Code Here

                                    "The Resources dictionary of type 3 font contains invalid font"));
                        }
                    }
                    catch (IOException e)
                    {
                        throw new ValidationException("Unable to valid the Type3 : " + e.getMessage());
                    }
                }
            }
        }
    }
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.