Printing oversized panel

Discussion about recent product features & solutions!
6 posts • Page 1 of 1
WalitziS
Posts:15
Joined: Tue Jan 18, 2011 11:06 am

Printing oversized panel

Post by WalitziS »

Hello,

most of our panels are the size of the monitor, but some are longer so we have a scrollbar on the right hand side.
By means of a button the user is able to print the panel on the appropriate monitor (max. 4 monitors available). That works for the "normal" sized panels.
However, the print result of the oversized panels is somehow strange: The correct size of the panel seems to be recognized, nevertheless only the visible part
is printed and the rest is black (see figure below).

__________________________________
| |
| |
| | Print ok
| |
| |
| |
|---------------------------------------------|
| | no panel, but printed in black color
| |
------------------------------------------------

If the scroll bar has been moved further down, the black part would split on the print ourt and would be above and below the visible part of the panel.

These are the commands lines in the "Clicked" call function we use:
:
dpSetWait(dp+"Print.Landscape:_original.._value",1,dp+"Print.FitToPage:_original.._value",0);
printRootPanel("mainModule_" + iModuleNumber,"",false);
:

We already tried to set "Print.FitToPage:_original.._value" to value "1" or work with "Print.Scale:_original.._value" but no difference. The print result would
be as we needed it or even changed.

Does anybody know a solution to how we get the whole panel on one page?

Regards,
Sabine Walitzi
Actemium Cegelec GmbH
OGE Solutions, Frankfurt

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Printing oversized panel

Post by Gertjan van Schijndel »

Did you try to load the panel in a bigger module, so you do not get scrollbars? You could run this bigger panel in a silent UI, if you want to hide this bigger module.

WalitziS
Posts:15
Joined: Tue Jan 18, 2011 11:06 am

Re: Printing oversized panel

Post by WalitziS »

We hadn't that idea yet. But we are going to test it tomorrow. Thank you so far!

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: Printing oversized panel

Post by fmulder »

Most of the high level shapes will have a method 'imageToFile()'. consider the following:

- Load your panel in an embedded module
- Call MYMODULE.imageToFile( "c:/tmp/screenshot.png" )
- Use a tool to print this image (I'm sure you'll find something standard in Windows)

Good luck

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Printing oversized panel

Post by mkoller »

When using printPanel() or printRootPanel() you can also pass a spec string. The doc says:

Default = "" and means print with child panels (is printed like a screenshot), "panelOnly" = prints the panel without child panels (without screenshot of the child panels).

As your panel is larger than currently visible, the UI cannot grab the invisible part by using a screenshot.
What you want is using "panelOnly", which just renders the whole panel (even the currently not visible part) into an image which is then being printed.

P.S.:The DPEs FitToPage and Scale are simply not implemented yet (they were in some old version but where never ported to the new Qt based UI)

WalitziS
Posts:15
Joined: Tue Jan 18, 2011 11:06 am

Re: Printing oversized panel

Post by WalitziS »

The solution proposal with the spec string "panelOnly" worked. Thanks a lot!

6 posts • Page 1 of 1