Package org.apache.pdfbox.preflight.parser

Examples of org.apache.pdfbox.preflight.parser.XmlResultParser.validate()


                    Element root = document.createElement("preflights");
                    document.appendChild(root);
                    root.setAttribute("count", String.format("%d", ftp.size()));
                    for (File file : ftp)
                    {
                        Element result = xrp.validate(document,new FileDataSource(file));
                        root.appendChild(result);
                    }
                    transformer.transform(new DOMSource(document), new StreamResult(new File(args[posFile]+".preflight.xml")));
                } else {
                    // isBatch
View Full Code Here


                    transformer.transform(new DOMSource(document), new StreamResult(new File(args[posFile]+".preflight.xml")));
                } else {
                    // isBatch
                    for (File file : ftp)
                    {
                        Element result = xrp.validate(new FileDataSource(file));
                        Document document = result.getOwnerDocument();
                        document.appendChild(result);
                        transformer.transform(new DOMSource(document), new StreamResult(new File(file.getAbsolutePath()+".preflight.xml")));
                    }
                }
View Full Code Here

                // simple validation
                System.exit(runSimple(fd));
            } else {
                // generate xml output
                XmlResultParser xrp = new XmlResultParser();
                Element result = xrp.validate(fd);
                Document document = result.getOwnerDocument();
                document.appendChild(result);
                Transformer transformer = TransformerFactory.newInstance().newTransformer();
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
View Full Code Here

                    Element root = document.createElement("preflights");
                    document.appendChild(root);
                    root.setAttribute("count", String.format("%d", ftp.size()));
                    for (File file : ftp)
                    {
                        Element result = xrp.validate(document,new FileDataSource(file));
                        root.appendChild(result);
                    }
                    transformer.transform(new DOMSource(document), new StreamResult(new File(args[posFile]+".preflight.xml")));
                } else {
                    // isBatch
View Full Code Here

                    transformer.transform(new DOMSource(document), new StreamResult(new File(args[posFile]+".preflight.xml")));
                } else {
                    // isBatch
                    for (File file : ftp)
                    {
                        Element result = xrp.validate(new FileDataSource(file));
                        Document document = result.getOwnerDocument();
                        document.appendChild(result);
                        transformer.transform(new DOMSource(document), new StreamResult(new File(file.getAbsolutePath()+".preflight.xml")));
                    }
                }
View Full Code Here

                // simple validation
                System.exit(runSimple(fd));
            } else {
                // generate xml output
                XmlResultParser xrp = new XmlResultParser();
                Element result = xrp.validate(fd);
                Document document = result.getOwnerDocument();
                document.appendChild(result);
                Transformer transformer = TransformerFactory.newInstance().newTransformer();
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
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.