Welcome and thank you for joining our new OpenText forum. Your questions, responses, best practices, and tips shared with other members will help make this channel vibrant. We're glad you're joining us and look forward to collaborating with you online.

Check out the Getting Started With OpenText Forums for tips on personalizing your experience.

Set of metadata properties (creator) of PDF report

Hi,

 

I have problem with metadata of created PDF.

 

In properties of this PDF file are metadata like Title, Author, .. these properties I can change.

  1. via report itself, or
  2. by code:


/* ('design' is instance of org.eclipse.birt.report.engine.api.IReportRunnable) */
design.getDesignHandle().setProperty("title", "myTitle");
design.getDesignHandle().setProperty("author", "myAuthor");


Problematic part "Creator":

But in case of metadata "Creator", this property is providing information which can break security (showing absolute path of BIRT runtime jar).

 

How can I avoid showing the path?

I would like to define something just like "BIRT".

Is there any way how can i change this "Creator" property (for example how it is described in mine 2nd option)?

I went through BIRT code and I think its somehow hardcoded and not configurable, but maybe im wrong.

 

Thanks

Comments

  • When the PDF is generated the Creator is set to text, BIRT Report Engine <version>.


    Where version is replaced by the version of BIRT or when using the BIRT runtime jar it is the location of the jar file.


    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.



    design.getDesignHandle().setProperty("createdBy", "Acme Inc.");

    A possible solution would be to change(or erase) the Creator value after BIRT is done generating the PDF using a library like iText.


    http://developers.itextpdf.com/examples/miscellaneous/adding-metadata


    Changing Metadata - http://developers.itextpdf.com/examples/miscellaneous/adding-metadata#1719-changemetadata.java

  • Hi Zorawar,


     


    Thank you very much for your suggestions!


     


    I would like to not use third party code, yes still solution (but i dont like it for now :) ).


    So i have to write mine pdf emitter just for this one line of code, which puts there jar location.


Sign In or Register to comment.