Printing + JSP

Posted on 2007-07-24
Last Modified: 2012-06-27
How could I create a print preview of a record which will be small in size?

I have a web application which has two print functions.  The function prints out two different records.  Right now, I have a simple print preview with a print button.  When a user goes to print the view, I notice that the size of the print was over 70 MB.  All I have on this page is a table with maybe ten get methods to retreive the data.  I am using jsp, beans, and servlets.  What is the best way to handle this?  Thanks all.  
Question by:OliviaRedhorse
    LVL 35

    Accepted Solution

    >> How could I create a print preview of a record which will be small in size?

    How are you doing the print preview now?

    Is it just the standard print-preview in the browser?

    How are you measuring the "size of the print"?

    Author Comment

    The print preview is just a jsp page with a get methods located in a table written in html and java.  I thought for some reason that this would be printer friendly.

    No, it is not the standard print from browser.  I have created a jsp page which is the print preview and then I print the current page.

    I am measuring the size of the print from looking at the printing informaiton on my computer.  In the printing que.

    LVL 35

    Assisted Solution

    The size of the print job is down to the browser I guess...

    It will depend on how much graphics you have, etc...

    How big is google's page when you try printing that?

    If you put a CSS stylesheet on your page with the media type set to "print" then you can use that to block out bits you don't want in the printout, and use the browser's print-preview  (as another option)

    ( is an example)

    I wouldn't worry about the size of the print job though...


    Author Comment

    okay, thank you so much!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    If you have upgraded to Java2 update 10 on a Microsoft Windows client, you may have discovered that your Java application does not work as it did before.  For example, the colors of your Java2D graphic may be all wrong for no apparent reason. Aft…
    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now