Package org.apache.pdfbox.preflight.parser

Examples of org.apache.pdfbox.preflight.parser.PreflightParser


            InputStream input = this.getClass().getResourceAsStream(path);

            ValidationResult result = null;
            try
            {
                PreflightParser parser = new PreflightParser(new org.apache.pdfbox.preflight.utils.ByteArrayDataSource(
                        input));
                parser.parse();
                document = (PreflightDocument) parser.getPDDocument();
                document.validate();
                result = document.getResult();
            }
            catch (SyntaxValidationException e)
            {
View Full Code Here


        System.out.println("Version : " + Version.getVersion());
    }
   
    private static int runSimple (DataSource fd) throws Exception {
        ValidationResult result = null;
        PreflightParser parser = new PreflightParser(fd);
        try
        {
            parser.parse();
            PreflightDocument document = parser.getPreflightDocument();
            document.validate();
            result = document.getResult();
            document.close();
        }
        catch (SyntaxValidationException e)
View Full Code Here

        }
        PreflightDocument document = null;
        try
        {
            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);
View Full Code Here

        }
        PreflightDocument document = null;
        try
        {
            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);
View Full Code Here

        }
        PreflightDocument document = null;
        try
        {
            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);
View Full Code Here

        }
        PreflightDocument document = null;
        try
        {
            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);
View Full Code Here

            System.exit(1);
        }

        ValidationResult result = null;
        FileDataSource fd = new FileDataSource(args[0]);
        PreflightParser parser = new PreflightParser(fd);
        try
        {
            parser.parse();
            PreflightDocument document = parser.getPreflightDocument();
            document.validate();
            result = document.getResult();
            document.close();
        }
        catch (SyntaxValidationException e)
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.preflight.parser.PreflightParser

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.