Skip to Content
author's profile photo Former Member
Former Member

how to print from iVews

Hi all,

How to generate & print iviews using Java .

Any report generation tools available?



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2004 at 12:00 PM


    There are no ready to use tools for this but there are some open source api´s out there to help you in getting this done. We actually implemented a pdf printing solution using one of these classes and it came out in a really nice way. That is I would think is the best bet for getting some nice printing options for iviews.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Dug up one of the documentations from this project. Maybe this can guide you to a solution. I know that you would probably want the whole thing, code and the documents but sorry.. not at this time.

      The design of the PDF generator was based on 4 main considerations

      • Centralizing the PDF functionality so that it can be accessed by multiple iViews using a simple interface and without duplication of code.

      • Use of existing open source PDF libraries to reduce coding effort

      • Easy implementing of future extensions

      These objectives were achieved by creating a portal service that implements the PDF functionality that can be used by any iView that requires it.

      The PDF Generator is implemented as a portal service. This means that once deployed, it can be accessed by any other portal component that requires a PDF capability. This allows the PDF code to be kept in one central location, instead of being replicated into each iview that needs it, reducing maintenance and efficiency problems.

      The core of the PDF Generator is the iText PDF library package (see This package contains the classes that create the actual PDF elements. The portal component incorporates the iText.jar within it’s zar file.

      1) In the required jsp file insert a link to initiate the PDF routines eg.



      text="PDF document"



      <% myLink.setFontSize(LinkFontSize.STANDARD); %>


      2) In the iViews profile file you need to add a reference to the PDFGenerator service

      ServicesReference=htmlb, jco, jcoclient, landscape, usermanagement, PDFGenerator

      ) Also in the profile you need to add an entry for the widths of the table columns

      eg PDFTableColumnSizes.value=6 7 8 8 23 8 8 8 8 8 8

      Each number represents the width in % of a table column. In the above case there are 11 columns.

      4) Add an onClick method into the main iview code

      The table column widths are read in from the property file. The other main factor is the referencing of the PDFGenerator service. This is the standard way of accessing services in the portal.

      The current default generator outputs a table, based on the contents an HTML TableModel object. If a more complex output format is needed a new generator class should be written.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.