Package org.apache.padaf.preflight

Examples of org.apache.padaf.preflight.PdfAValidator


 
 
  @Test
  public void testGetVersion () throws Exception {
    PdfAValidatorFactory factory = new PdfAValidatorFactory();
    PdfAValidator validator = factory.createValidatorInstance(PdfAValidatorFactory.PDF_A_1_b);
   
    System.err.println(">> "+validator.getFullName());
  }
View Full Code Here


      }
    }

    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss.Z");

    PdfAValidator validator = new PdfAValidatorFactory().createValidatorInstance(PdfAValidatorFactory.PDF_A_1_b);
    long startGTime = System.currentTimeMillis();
   
    int size = lfd.size();
    for (int i = 0 ; i < loop ; i++) {
      File file = lfd.get(i%size);
      long startLTime = System.currentTimeMillis();
      ValidationResult result = validator.validate(new FileDataSource(file));
      if (!result.isValid()) {
        resFile.write(file.getAbsolutePath() + " isn't PDF/A\n");
        for (ValidationError error : result.getErrorsList()) {
          resFile.write(error.getErrorCode() + " : " + error.getDetails() +"\n");
        }
View Full Code Here

public class TestPdfaValidationFactory {

  @Test
  public void createPDFA1bValidator() throws ValidationException {
    PdfAValidatorFactory fact = new PdfAValidatorFactory();
    PdfAValidator val = fact
        .createValidatorInstance(PdfAValidatorFactory.PDF_A_1_b);
    assertTrue(val instanceof PdfA1bValidator);
  }
View Full Code Here

TOP

Related Classes of org.apache.padaf.preflight.PdfAValidator

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.