Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to change exported PDFdocument metadata properties


    vchiem
    • Features: Ad Hoc, Reports Version: v8, v7 Product: JasperReports® Server

    Issue:

    After exporting an Ad Hoc Report to PDF output, the title of the exported PDF has the name "Ad Hoc Report".

    How can this title be changed to a different name like "Any Name Report"?

     


     

    Solution:

    PDF document metadata properties including the Title can be changed with the following available properties:

    net.sf.jasperreports.export.pdf.metadata.author

    net.sf.jasperreports.export.pdf.metadata.creator

    net.sf.jasperreports.export.pdf.metadata.keywords

    net.sf.jasperreports.export.pdf.metadata.subject

    net.sf.jasperreports.export.pdf.metadata.title

    These properties correspond to the metadata information when you open the File -> Properties menu of the PDF document using Acrobat Reader. 

    For report templates created in TIBCO Jaspersoft® Studio, you can add the following property to the report's main properties: 

    <property name="net.sf.jasperreports.export.pdf.metadata.title" value="Any Name Report"/>

    This property also can be added globally to the TIBCO JasperReports® Server's jasperreports.properties file located in the WEB-INF/classes directory.  

    However, if it is specified at the report level then the property at the report level will take precedence.

    In the case of exporting Ad Hoc Report to PDF, the ad hoc report template has this property pre-defined with:

    <property name="net.sf.jasperreports.export.pdf.metadata.title" value="Ad Hoc Report"/>

    but you can use TIBCO Jaspersoft® Studio to navigate to the TIBCO JasperReports® Server repository and open the Ad Hoc Report's report template named mainReportJrxml.  

    Make the change to the property before saving the report and publishing the report to the server. 

    After logging out of the TIBCO JasperReports® Server and logging back in to perform the next PDF export, the title change should be reflected in the PDF document properties.

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...