craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > Printing issues Post New Topic   Post A Reply
fontsize for printing printer friendly version
next newest post | next oldest post
Author Messages
Ron Troyer
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, October 13, 2004 @ 22:27:02  

Hi

I would like to suggest an enhancement to the PrintProperties class. Can we
have a method getBodyFontSize. The purpose of this routine is to specify
the font size to use in the body of the print routine. This way the size of
the table could be scaled down, to get more on the page. many tables could
be made to fit on one page wide, if we could use a smaller font.

Regards
Ron Troyer

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Wednesday, October 13, 2004 @ 22:37:19  

QuickTable prints the tables with the original font of the table. So during priniting you can apply a skin and change the look of the table such that the font size & row height is reduced , so that we can fit more rows/columns in one page

You can create the following skin

class PrintSkin extends Skin
{
public PrintSkin()
{
put(Skin.TABLE_FONT,new Font("Arial",Font.PLAIN,10));
put(Skin.ROW_HEIGTH, new Integer(12));
}
}

//during print/printpreview
dBTable1.setSkin(new PrintSkin());
dBTable1.printPreview();

//after the print/printpreview is complete, you can switch back to original size
dBTable1.setSkin(null);
//Important, you cannot reset the skin until print/printpreview is complete

jamen
Corporal

Gender: Unspecified
Location:
Registered: Sep 2007
Status: Offline
Posts: 22

Click here to see the profile for jamen Send email to jamen Send private message to jamen Find more posts by jamen Edit or delete this message Reply w/Quote
Posted Wednesday, October 10, 2007 @ 09:20:18  

Quote:
//Important, you cannot reset the skin until print/printpreview is complete

When do you think this is exactly? I've tried everything I can think of including looking at the system.printer properties and can't find programatically when its done. I assume its printing in a seperate thread that I don't have access to.

btw, all in all this is a great bean and I've been making prolific use of it in my project.

mexican
Private First Class

Gender: Male
Location: Mexico city
Registered: Sep 2008
Status: Offline
Posts: 12

Click here to see the profile for mexican Send email to mexican Send private message to mexican Find more posts by mexican Edit or delete this message Reply w/Quote
Posted Monday, October 6, 2008 @ 13:06:21  

Hi again, I need to resize the table for printing, I had read this is done with the Skin, but I don't know where to switch back to the initial size after print/preview is complete, and the user jamen has the the doubt but you didn't answer him? Could you be so kind to tell me How do I know the print or the printpreview is complete? Is it a ComponentListener?, Do I have to deal with PreviewPanel? thanks.
Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Tuesday, October 7, 2008 @ 11:53:38  

You need to use JDK 1.4+ to find out when the printing is complete

Refer api
http://quicktable.org/doc/quick/dbtable/DBTable.html#getPrintable(quick.dbtable.PrintProperties)

Then read following thread, to find out when print job is complete
http://quicktable.org/discussion/cutecast/cutecast.pl?forum=7&thread=181

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios