Package org.apache.pdfbox.preflight

Examples of org.apache.pdfbox.preflight.PreflightPath.peek()


        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);

        checkMandatoryFields(context, page, tilingPattern);
        parseResources(context, page, tilingPattern);
        parsePatternContent(context, page, tilingPattern);
View Full Code Here


        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)
        { // if fontContainer isn't null the font is already checked
            FontValidator<? extends FontContainer> validator = getFontValidator(context, font);
            validator.validate();
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.