grafro Posted July 3, 2015 Share Posted July 3, 2015 hello guys, i have a question to XMP metadata.I'm generating a PDF/1_1A and i'm validating the document with Adobe Acrobat Pro.As long as I don't define a report title and/or subject, it is verified as a PDF/A_1A document.When i ass a title and/or a subject, i get a validation error.SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration(); configuration.setMetadataSubject("Test Invoice"); configuration.setMetadataTitle("Report-Title");configuration.setTagged(true);configuration.setPdfaConformance(PdfaConformanceEnum.PDFA_1A); [/code]Adobe Pro gives me the following error message:I took a look into the pdf, the title and description are written like:<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/pdf</dc:format> <dc:description> <rdf:Alt> <rdf:li>Test Invoice</rdf:li> </rdf:Alt> </dc:description> <dc:title> <rdf:Alt> <rdf:li>Report-Title</rdf:li> </rdf:Alt> </dc:title> <dc:subject> <rdf:Bag> <rdf:li>Test Invoice</rdf:li> </rdf:Bag> </dc:subject> <dc:creator> <rdf:Seq> <rdf:li>AUTO Generator</rdf:li> </rdf:Seq> </dc:creator> </rdf:Description> .... .... </rdf:RDF></x:xmpmeta>[/code]After the correction function of Adobe it looks like:<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c015 81.157285, 2014/12/12-00:43:15 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" ....................... .......................> <dc:format>application/pdf</dc:format> <dc:description> <rdf:Alt> <rdf:li xml:lang="x-default">Test Invoice</rdf:li> <rdf:li xml:lang="x-repair">Test Invoice</rdf:li> </rdf:Alt> </dc:description> <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">Report-Title</rdf:li> <rdf:li xml:lang="x-repair">Report-Title</rdf:li> </rdf:Alt> </dc:title> <dc:subject> <rdf:Bag> <rdf:li>Test Invoice</rdf:li> </rdf:Bag> </dc:subject> <dc:creator> <rdf:Seq> <rdf:li>AUTO Generator</rdf:li> </rdf:Seq> </dc:creator> ..... . .. </rdf:Description> </rdf:RDF></x:xmpmeta>[/code]You can see, title and description had been changed... and are valid entries now...Here is the PDF (generated by Jasperreports 6.1.0) https://www.dropbox.com/s/lptf0g85ta1ijcz/test_pdfa1a_1436432965169.pdf?dl=0Is this a Bug in JasperReports?Am I using the wrong code for adding XMP metadata?Is this an Adobe issue?Thanks for any help!Greeting from Vienna, Paul Link to comment Share on other sites More sharing options...
hozawa Posted July 6, 2015 Share Posted July 6, 2015 Did you set the following property in your report?net.sf.jasperreports.export.pdfa.conformanceProperty whose value is used as default for the getPdfaConformance() export configuration setting. It specifies the conformance level of the PDF/A document. Possible values are: pdfa1a, pdfa1band none. By default, this property is set to none. Link to comment Share on other sites More sharing options...
grafro Posted July 8, 2015 Author Share Posted July 8, 2015 Hey hozawa,thanks for your reply!yes i did:......configuration.setTagged(true);configuration.setPdfaConformance(PdfaConformanceEnum.PDFA_1A);...... [/code] greeting paul Link to comment Share on other sites More sharing options...
Solution grafro Posted October 15, 2015 Author Solution Share Posted October 15, 2015 Take a look at:http://community.jaspersoft.com/jasperreports-library/issues/5061 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now