Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Set of metadata properties (creator) of PDF report
Marek Kocar
<div>Hi,</div>
<div> </div>
<div>I have problem with metadata of created PDF.</div>
<div> </div>
<div>In properties of this PDF file are metadata like Title, Author, .. these properties I can change.</div>
<ol><li>via report itself, or</li>
<li>by code:</li>
</ol><div>
<pre class="_prettyXprint">
/* ('design' is instance of org.eclipse.birt.report.engine.api.IReportRunnable) */
design.getDesignHandle().setProperty("title", "myTitle");
design.getDesignHandle().setProperty("author", "myAuthor");</pre>
</div>
<div>Problematic part "Creator":</div>
<div>But in case of metadata "Creator", this property is providing information which can break security (showing absolute path of BIRT runtime jar).</div>
<div> </div>
<div>How can I avoid showing the path?</div>
<div>I would like to define something just like "BIRT".</div>
<div>Is there any way how can i change this "Creator" property (for example how it is described in mine 2nd option)?</div>
<div>I went through BIRT code and I think its somehow hardcoded and not configurable, but maybe im wrong.</div>
<div> </div>
<div>Thanks</div>
Find more posts tagged with
Comments
Zorawar
<p>When the PDF is generated the Creator is set to text, <span style="font-family:'courier new', courier, monospace;">BIRT Report Engine <version></span>.</p>
<p>Where <span style="font-family:'courier new', courier, monospace;">version</span> is replaced by the version of BIRT or when using the BIRT runtime jar it is the location of the jar file.</p>
<p>Even though there is a property to indicate the creator, it does not have any effect as it does not seem to be considered for PDF output.</p>
<pre class="_prettyXprint">
design.getDesignHandle().setProperty("createdBy", "Acme Inc.");</pre>
<p>A possible solution would be to change(or erase) the Creator value after BIRT is done generating the PDF using a library like iText.</p>
<p><a data-ipb='nomediaparse' href='
http://developers.itextpdf.com/examples/miscellaneous/adding-metadata'>http://developers.itextpdf.com/examples/miscellaneous/adding-metadata</a></p>
;
<p>Changing Metadata - <a data-ipb='nomediaparse' href='
http://developers.itextpdf.com/examples/miscellaneous/adding-metadata#1719-changemetadata.java'>http://developers.itextpdf.com/examples/miscellaneous/adding-metadata#1719-changemetadata.java</a></p>
;
Marek Kocar
<p>Hi Zorawar,</p>
<p> </p>
<p>Thank you very much for your suggestions!</p>
<p> </p>
<p>I would like to not use third party code, yes still solution (but i dont like it for now
).</p>
<p>So i have to write mine pdf emitter just for this one line of code, which puts there jar location.</p>