Skip to main content



      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 05:39 Go to next message
Eclipse UserFriend
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 05:46] by Moderator

Re: How to get correct area for printing nattable? [message #1576503 is a reply to message #1576481] Wed, 21 January 2015 05:52 Go to previous messageGo to next message
Eclipse UserFriend
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 06:07 Go to previous messageGo to next message
Eclipse UserFriend
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 06:11] by Moderator

Re: How to get correct area for printing nattable? [message #1576549 is a reply to message #1576522] Wed, 21 January 2015 06:25 Go to previous message
Eclipse UserFriend
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: Sun Jul 27 16:26:42 EDT 2025

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

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

Back to the top