java - how to validate all preflight error for PDF/A-1a in pdfbox -
i working vaildate pdfa/1a .i followed code exist in link pdfbox preflight pdf/a-1b check not working in java version 1.8
public class test { public static void main(final string[] args) throws exception { file pdfa=new file("d:/dmc-b787-a-00-40-07-00a-008b-d.pdf"); // error pdf ispdfadocument(pdfa); system.out.println("sucess"); } private static void ispdfadocument(file pdfa) { validationresult result = null; preflightparser parser; try { parser = new preflightparser(pdfa); parser.parse(format.pdf_a1a); preflightdocument documentt = parser.getpreflightdocument(); result = documentt.getresult(); system.out.println("result"+result); documentt.close(); } catch (syntaxvalidationexception e) { result = e.getresult(); } catch (ioexception e) { e.printstacktrace(); } if (result.isvalid()) { system.out.println("the file " + pdfa + " valid pdf/a-1a file"); } else { system.out.println("the file" + pdfa + " not valid, error(s) :"); (validationerror error : result.geterrorslist()) { system.out.println(error.geterrorcode() + " : " + error.getdetails()); } } it's not checking error mention below .if there have show exception still vaildate success. kindly suggest how validate probability preflight error below .how check in pdfbox.
error
charset incomplete type 1 font (2 matches on 1 page) - 2 width information rendered glyphs inconsistent (2 matches on 1 page) - 2 document information file name: "dmc-b787-a-00-40-07-00a-008b-d.pdf" path: "c:\users\wm751e\documents\feb19\synchronize print\only wdm\archived doctypes latest\ea_tbc2016-02-2115.57.49ipd\ea_tbc2016-02-2115.57.49ipd\00" pdf version number: "1.4" file size (kb): 114.2 title: "illustrated parts data - service bulletin/modification list" author: "the boeing company (printengineweb_build_1.7.49.5.0.0; s1000d_merged_v6.5.36_4.xsl; jobid:)" creator: "ah xsl formatter v6.0 mr7 linux64 : 6.0.8.9416 (2013/02/26 10:36jst)" producer: "antenna house pdf output library 6.0.389 (linux64)" created: "2/21/2016 3:56 pm" modified: "2/21/2016 3:56 pm" trapping: "false" number of plates: 4 names of plates: "(cyan) (magenta) (yellow) (black) " environment preflight, 15.0.0 (151) acrobat version: 15.60 operating system: microsoft windows 7 service pack 1 (build 7601
Comments
Post a Comment