Hello Morten, the file uses a cross reference stream and as such this is not PDF/A-1 compliant.
BR Maruan Am Freitag, dem 22.09.2023 um 14:29 +0200 schrieb Morten Stulen: > This email went to the spam folder so I didn't see it before now. > > Here's a link to an example PDF we generate: > https://drive.google.com/file/d/1vNbfQyWNyJq_mGNPYF9a3CI0X9K9CDSQ/view?usp=sharing > > Morten > > > ᐧ > > On Wed, Sep 20, 2023 at 6:48 PM Tilman Hausherr > <thaush...@t-online.de> > wrote: > > > Please upload your PDF somewhere and link to it. > > > > If there is really a cross reference stream, then the error message > > is > > correct (and 2.0.29 is at fault), because that is a PDF 1.5 feature > > and > > PDF/A-1b is based on 1.4. > > > > Tilman > > > > > > On 20.09.2023 17:00, Morten Stulen wrote: > > > After upgrading to PDFBox 3, the PreflightParser.validate() > > > function > > > returns an error. > > > "Trailer Syntax error, /XRef cross reference streams are not > > > allowed" > > > > > > Code: > > > > > > fun isValid(bytes: ByteArray): Boolean { > > > val fileName = "tmp_${UUID.randomUUID()}.pdf" > > > val file = File(fileName) > > > > > > val document = Loader.loadPDF(bytes) > > > document.save(fileName) > > > > > > // This returns a ValidationError > > > val result = PreflightParser.validate(file) > > > > > > return result.isValid > > > } > > > > > > The tested PDFs are the same as before the upgrade. > > > > > > > > > > > > ᐧ > > > > > > > > > ------------------------------------------------------------------- > > -- > > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > > For additional commands, e-mail: users-h...@pdfbox.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org