Package org.apache.pdfbox.preflight

Examples of org.apache.pdfbox.preflight.PreflightDocument.validate()


        PreflightDocument document = parser.getPreflightDocument();

        // Validate the document.
        ValidationResult result = null;
        try {
            document.validate();
            result = document.getResult();
        } catch (SyntaxValidationException exception) {
            result = exception.getResult();
        } finally {
            document.close();
View Full Code Here


        {
            FileDataSource bds = new FileDataSource(path);
            PreflightParser parser = new PreflightParser(bds);
            parser.parse();
            document = parser.getPreflightDocument();
            document.validate();

            ValidationResult result = document.getResult();
            Assert.assertFalse(path + " : Isartor file should be invalid (" + path + ")", result.isValid());
            Assert.assertTrue(path + " : Should find at least one error", result.getErrorsList().size() > 0);
            // could contain more than one error
View Full Code Here

        {
            FileDataSource bds = new FileDataSource(path);
            PreflightParser parser = new PreflightParser(bds);
            parser.parse();
            document = parser.getPreflightDocument();
            document.validate();

            ValidationResult result = document.getResult();
            Assert.assertFalse(path + " : Isartor file should be invalid (" + path + ")", result.isValid());
            Assert.assertTrue(path + " : Should find at least one error", result.getErrorsList().size() > 0);
            // could contain more than one error
View Full Code Here

            PreflightParser parser = new PreflightParser(source);
            try
            {
                parser.parse();
                PreflightDocument document = parser.getPreflightDocument();
                document.validate();
                pdfType = document.getSpecification().getFname();
                result = document.getResult();
                document.close();
            }
            catch (SyntaxValidationException e)
View Full Code Here

        {
            FileDataSource bds = new FileDataSource(path);
            PreflightParser parser = new PreflightParser(bds);
            parser.parse();
            document = parser.getPreflightDocument();
            document.validate();

            ValidationResult result = document.getResult();
            Assert.assertFalse(path + " : Isartor file should be invalid (" + path + ")", result.isValid());
            Assert.assertTrue(path + " : Should find at least one error", result.getErrorsList().size() > 0);
            // could contain more than one error
View Full Code Here

        {
            FileDataSource bds = new FileDataSource(path);
            PreflightParser parser = new PreflightParser(bds);
            parser.parse();
            document = parser.getPreflightDocument();
            document.validate();

            ValidationResult result = document.getResult();
            Assert.assertFalse(path + " : Isartor file should be invalid (" + path + ")", result.isValid());
            Assert.assertTrue(path + " : Should find at least one error", result.getErrorsList().size() > 0);
            // could contain more than one error
View Full Code Here

        {
            FileDataSource bds = new FileDataSource(path);
            PreflightParser parser = new PreflightParser(bds);
            parser.parse();
            document = parser.getPreflightDocument();
            document.validate();

            ValidationResult result = document.getResult();
            Assert.assertFalse(path + " : Isartor file should be invalid (" + path + ")", result.isValid());
            Assert.assertTrue(path + " : Should find at least one error", result.getErrorsList().size() > 0);
            // could contain more than one error
View Full Code Here

        {
            FileDataSource bds = new FileDataSource(path);
            PreflightParser parser = new PreflightParser(bds);
            parser.parse();
            document = parser.getPreflightDocument();
            document.validate();

            ValidationResult result = document.getResult();
            Assert.assertFalse(path + " : Isartor file should be invalid (" + path + ")", result.isValid());
            Assert.assertTrue(path + " : Should find at least one error", result.getErrorsList().size() > 0);
            // could contain more than one error
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.