Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » How to get correct area for printing nattable?
How to get correct area for printing nattable? [message #1576481] Wed, 21 January 2015 10:39 Go to next message
Shafi Vijapurwala is currently offline Shafi VijapurwalaFriend
Messages: 13
Registered: November 2014
Junior Member
I am trying to print my nattable using Tutorial example as reference. The problem is that the nattable gets printed in such a small area on paper that it is difficult to properly view it. For example, the entire nattable occupies 1/8th area of the paper.

I tried built in nattable.doCommand(new PrintCommand(...)) initially, and got the above mentioned issue. (I added the stated nattable configurations as per the tutorial example)

Then I tried printing by using LayerPainter. The underlying layer I am trying to print is a CompositeLayer. I added my custom layerpainter and made some changes, but the size of the printed nattable did not increase. Please help.

[Updated on: Wed, 21 January 2015 10:46]

Report message to a moderator

Re: How to get correct area for printing nattable? [message #1576503 is a reply to message #1576481] Wed, 21 January 2015 10:52 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
A custom LayerPainter won't help. You need to check the LayerPrinter. Maybe there is an issue with the DPI calculation.
Re: How to get correct area for printing nattable? [message #1576522 is a reply to message #1576503] Wed, 21 January 2015 11:07 Go to previous messageGo to next message
Shafi Vijapurwala is currently offline Shafi VijapurwalaFriend
Messages: 13
Registered: November 2014
Junior Member
Okay, sounds reasonable. I checked that returning a larger print area from the computePrintArea(Printer) increases the height, but not the width.

[Updated on: Wed, 21 January 2015 11:11]

Report message to a moderator

Re: How to get correct area for printing nattable? [message #1576549 is a reply to message #1576522] Wed, 21 January 2015 11:25 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I think it is related to computeScaleFactor() where a scaling factor is calculated dependent to the DPI of your display and the DPI of your printer. So I would search there.
Previous Topic:NatTable version numbers
Next Topic:1.2 Release
Goto Forum:
  


Current Time: Tue Apr 23 11:22:30 GMT 2024

Powered by FUDForum. Page generated in 0.03809 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top