Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
PDF/A in BIRT 2.6.2
EkkeW
<p>Hello, </p>
<p> </p>
<p>I need pdf in PDF/A format with BIRT 2.6.2. I have tried a lot but can not manage it (the jar file should be jar signed, the actual Eclipse for Report uses 4.1, patching the jar file without signing it will cause an "The output format pdf is not supported." error)...</p>
<p> </p>
<p>Is there a version for the the pdf emitter with PDF/A output format or how can I build it without rebuild the whole BIRT version.</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
mwilliams
Jozef,<br><br>Are you able to share your code/plugins in a devshare post? You might also consider submitting a bugzilla post at www.eclipse.org/birt/community/ and attaching your code there to see if you can get it added to the product.
Jozef
<p>Hi, I have really only changed 3 lines in constructor of <span style="background-color:#e4e4ff;">class PDFPageDevice.</span> One line has been disabled and added two new lines.</p>
<p> </p>
<p><span style="color:#808080;font-style:italic;">//writer.setFullCompression( );</span><br><span style="color:#660e7a;font-weight:bold;">writer</span>.setPdfVersion(PdfWriter.<span style="color:#660e7a;font-weight:bold;font-style:italic;">PDF_VERSION_1_4</span>);<br><span style="color:#660e7a;font-weight:bold;">writer</span>.setPDFXConformance(PdfWriter.<span style="color:#660e7a;font-weight:bold;font-style:italic;">PDFA1A</span>);</p>
<p> </p>
<p>IMHO you can refactor these hard-coded changes into new options <span style="background-color:#e4e4ff;">in <span style="background-color:#e4e4ff;">org.eclipse.birt.report.engine.<span style="background-color:#e4e4ff;">api.</span>PDFRenderOption</span>.</span></p>
EkkeW
<p>First of all: I am awfully sorry. <br><br>
There were three errors …<br><br>
1. first is on my side: If the MANIFEST.MF is not in the way BIRT require it then the code will not work. The jar file was generated with it's own MANIFEST.MF (build by the ant tool) and I have to write all the parameters which are in the regular PDF Emitter used (changing PDF to PDFA in all places).</p>
<p> </p>
<p>2. The code must be enhanced by <br>
​ writer.setPdfVersion(PdfWriter.PDF_VERSION_1_4);//i tried with 1_7 instead, same result</p>
<div> writer.setTagged(); // You need to set this flag.iText does lots of work when this flag is set.</div>
<div> writer.setPDFXConformance(PdfWriter.PDFA1A);</div>
<div> writer.createXmpMetadata();</div>
<div>I found the hint at <a data-ipb='nomediaparse' href='
http://itext.2136553.n4.nabble.com/IText-PDF-A-1A-compliance-td3783719.html'>http://itext.2136553.n4.nabble.com/IText-PDF-A-1A-compliance-td3783719.html</a></div>
;
<div> </div>
<div>3. The PdfCopyFields from com.lowagie.text.pdf will remove the PDF/A. <br>
I will check if there is a possibility but I found only some libraries which are not free ... and with Birt 2.2.6 the jars are too old (but I am not sure).</div>
<div> </div>
<div>So once again: Thank you Michael for your support and your patience - I wish I have take a more thorough check of the files. </div>
<div> </div>
<div>I hope that other despairing programmer will not do the same mistakes as I.</div>
Jerome
<blockquote class="ipsBlockquote" data-author="Jozef" data-cid="136608" data-time="1433225520">
<div>
<p>Hi, I have really only changed 3 lines in constructor of <span style="background-color:#e4e4ff;">class PDFPageDevice.</span> One line has been disabled and added two new lines.</p>
<p> </p>
<p><span style="color:#808080;font-style:italic;">//writer.setFullCompression( );</span><br><span style="color:#660e7a;font-weight:bold;">writer</span>.setPdfVersion(PdfWriter.<span style="color:#660e7a;font-weight:bold;font-style:italic;">PDF_VERSION_1_4</span>);<br><span style="color:#660e7a;font-weight:bold;">writer</span>.setPDFXConformance(PdfWriter.<span style="color:#660e7a;font-weight:bold;font-style:italic;">PDFA1A</span>);</p>
<p> </p>
<p>IMHO you can refactor these hard-coded changes into new options <span style="background-color:#e4e4ff;">in <span style="background-color:#e4e4ff;">org.eclipse.birt.report.engine.<span style="background-color:#e4e4ff;">api.</span>PDFRenderOption</span>.</span></p>
</div>
</blockquote>
<p> </p>
<p> </p>
<blockquote class="ipsBlockquote" data-author="Jozef" data-cid="136100" data-time="1431354602">
<div>
<p>I was able to build a similar custom PDFA emitter plugin for Birt 4.4.2.</p>
</div>
</blockquote>
<p>Hi,</p>
<p> </p>
<p>I was googling how to configure Birt to render PDF in PDF/A 1.4 and found this post.</p>
<p>I understood that it's not a parameter and that the code should be edited. I've also red the bug 362282 which the status is still "NEW" since 2011.</p>
<p> </p>
<p>We design report in Eclipse and use them for PHP app with the Web Viewer (Tomcat).</p>
<p> </p>
<p>Since we are not Java developers it's difficult for us to get a functional Birt development environment and build the emitter from source.</p>
<p>We have tried...</p>
<p> </p>
<p>So because, we are also using Birt 4.4.2, i was just wondering if you can help us by sending the appropriate jar or the appropriate compiled .class i'll could insert in my org.eclipse.birt.runtime_4.4.2.v20150217-1805.jar ?</p>
<p> </p>
<p>Thank a lot in advance for your answers.</p>
<p> </p>
<p>Jerome</p>