Hi there
I'm new on using veraPDF and have some basic problems.
I want to use veraPDF in my own software and tried the following,
- Download the veraPDF-library, mvn clean install and added the jar to my pom.xml
- I followed the steps described on http://docs.verapdf.org/develop/
- Tried first with Greenfield validation model and later on the PDFBox validation model
- With both there were several jars missing (org/mozilla/javascript/Scriptable; org/verapdf/model/baselayer/Object; and so on)
So I'm quite sure, that I'm doing something completely wrong L
Can please somebody help me,
- which projects to download exactly
- how to configure/implement it to my code
Thanks a lot, best regards
Adrian Suter
smaps GmbH
Diessbachstrasse 2, 3253 Schnottwil
Mobil +41 (0)79 945 91 01
mailto:adrian.suter@smaps.ch adrian.suter@smaps.ch
Hi,
Download the veraPDF-library, mvn clean install and added the
jar to my pom.xml
You should not even need to download it. I think the section Maven for integrators may be outdated. If I remeber correctly I managed to get a working example after I did something like
<dependency> <groupId>org.verapdf</groupId> <artifactId>verapdf-library</artifactId> <version>1.4.1</version> <type>pom</type> </dependency>
I followed the steps described on http://docs.verapdf.org/develop/
... I therefore assume you want to embed a PDF/A validation in your software?
So I’m quite sure, that I’m doing something completely wrong L
Does it work when you embed the library? If not, could you please elaborate on the error messages you encounter?
thanks and kind regards Jochen
Hi Adrian,
Thanks to Jochen for getting in touch, I think that the best method is to use straightforward Maven. Checking up on the answer led me to discover that the latest 1.6 Maven artefacts weren't deployed to Maven central so I've just uploaded them, they'll be there tomorrow.
The simplest and quickest way would be to use the Greenfield validation-model. Once Maven has indexed my uploads this would be:
<dependency> <groupId>org.verapdf</groupId> <artifactId>validation-model</artifactId> <version>1.6.2</version></dependency>
If that doesn't work then the following 1.4 instructions will while Maven rights itself.
<dependency> <groupId>org.verapdf</groupId> <artifactId>validation-model</artifactId> <version>1.4.7</version></dependency>
The initialistion and validation code at the bottom of this page: http://docs.verapdf.org/develop/ should work now. Feel free to ask further questions.
Best, Carl
Carl Wilson | Technical Lead carl@openpreservation.org | skype: carl.f.wilson Open Preservation Foundation | openpreservation.org http://www.openpreservation.org/
On Tue, 1 Aug 2017 at 11:08 Adrian Suter smaps GmbH adrian.suter@smaps.ch wrote:
Hi there
I’m new on using veraPDF and have some basic problems.
I want to use veraPDF in my own software and tried the following,
Download the veraPDF-library, mvn clean install and added the
jar to my pom.xml
I followed the steps described on
http://docs.verapdf.org/develop/
Tried first with Greenfield validation model and later on the
PDFBox validation model
With both there were several jars missing (org/mozilla/javascript/Scriptable;
org/verapdf/model/baselayer/Object; and so on)
So I’m quite sure, that I’m doing something completely wrong L
Can please somebody help me,
which projects to download exactly
how to configure/implement it to my code
Thanks a lot, best regards
Adrian Suter
*smaps GmbH*
Diessbachstrasse 2, 3253 Schnottwil
Mobil +41 (0)79 945 91 01 <+41%2079%20945%2091%2001>
adrian.suter@smaps.ch
Users mailing list Users@lists.verapdf.org http://lists.verapdf.org/listinfo/users
Hi Carl
thanks for your feedback, I was able to integrate veraPDF now.
And it led me to my next problem/question.
The PDF files, I have to validate, are embedded in a XML document as a Base64 encoded text.
A requirement to my software is, that no files shall be written or read, due to security and performance reasons.
With the actual pdf-validation software it’s possible to pass the pdf as a byte[].
I tried some similar with veraPDF, like this:
Foundries.defaultInstance().createParser(new ByteArrayInputStream(pdfStrB64.getBytes()),flavour))
This ends up with the following exceptions:
Executing CDA validation...org.verapdf.core.ModelParsingException: Couldn't parse stream
at org.verapdf.gf.model.GFModelParser.createModelWithFlavour(GFModelParser.java:97)
at org.verapdf.pdfa.VeraFoundry.createParser(VeraFoundry.java:71)
…….
Caused by: java.io.IOException: PDFParser::GetXRefInfo(...)startxref validation failed
at org.verapdf.parser.PDFParser.getXRefInfo(PDFParser.java:494)
at org.verapdf.parser.PDFParser.getXRefInfo(PDFParser.java:219)
at org.verapdf.io.Reader.init(Reader.java:143)
at org.verapdf.io.Reader.<init>(Reader.java:66)
at org.verapdf.cos.COSDocument.initReader(COSDocument.java:119)
at org.verapdf.cos.COSDocument.<init>(COSDocument.java:98)
at org.verapdf.pd.PDDocument.<init>(PDDocument.java:65)
at org.verapdf.gf.model.GFModelParser.<init>(GFModelParser.java:70)
at org.verapdf.gf.model.GFModelParser.createModelWithFlavour(GFModelParser.java:93)
... 11 more
Is there another way to do the validation, the way I should do it?
Thanks and best regards
Adrian
From: Carl Wilson [mailto:carl@openpreservation.org] Sent: Dienstag, 1. August 2017 18:15 To: Adrian Suter smaps GmbH; users@lists.verapdf.org Subject: Re: [Users] Use of veraPDf
Hi Adrian,
Thanks to Jochen for getting in touch, I think that the best method is to use straightforward Maven. Checking up on the answer led me to discover that the latest 1.6 Maven artefacts weren't deployed to Maven central so I've just uploaded them, they'll be there tomorrow.
The simplest and quickest way would be to use the Greenfield validation-model. Once Maven has indexed my uploads this would be:
<dependency> <groupId>org.verapdf</groupId> <artifactId>validation-model</artifactId> <version>1.6.2</version> </dependency>
If that doesn't work then the following 1.4 instructions will while Maven rights itself.
<dependency> <groupId>org.verapdf</groupId> <artifactId>validation-model</artifactId> <version>1.4.7</version> </dependency>
The initialistion and validation code at the bottom of this page: http://docs.verapdf.org/develop/ should work now. Feel free to ask further questions.
Best,
Carl
Carl Wilson | Technical Lead
mailto:carl@openpreservation.org carl@openpreservation.org | skype: carl.f.wilson
Open Preservation Foundation | http://www.openpreservation.org/ openpreservation.org
On Tue, 1 Aug 2017 at 11:08 Adrian Suter smaps GmbH adrian.suter@smaps.ch wrote:
Hi there
I’m new on using veraPDF and have some basic problems.
I want to use veraPDF in my own software and tried the following,
- Download the veraPDF-library, mvn clean install and added the jar to my pom.xml
- I followed the steps described on http://docs.verapdf.org/develop/
- Tried first with Greenfield validation model and later on the PDFBox validation model
- With both there were several jars missing (org/mozilla/javascript/Scriptable; org/verapdf/model/baselayer/Object; and so on)
So I’m quite sure, that I’m doing something completely wrong L
Can please somebody help me,
- which projects to download exactly
- how to configure/implement it to my code
Thanks a lot, best regards
Adrian Suter
smaps GmbH
Diessbachstrasse 2, 3253 Schnottwil
Mobil +41 (0)79 945 91 01 tel:+41%2079%20945%2091%2001
adrian.suter@smaps.ch
_______________________________________________ Users mailing list Users@lists.verapdf.org http://lists.verapdf.org/listinfo/users
users@lists.openpreservation.org