03-25-2009 01:56 PM
When using PrintPanel for a panel containing a GraphControl, the left y-axis label of the graph is not showing up in the printed copy (right y-axis OK). A very small portion of the label is visible, the remainder being clipped. Also tried a TextMessage control turned 90 degrees as a work-around, but it suffers the same fate. Failed on both HP and Xerox printers. Tried in CVI 5.0.1 and 9.0, same result in both.
Any suggestions, or proposed work-around?
03-26-2009 03:02 PM
ruskin1,
What parameters are you using in your PrintPanel function call? And are you setting any of the print attributes before printing (using SetPrintAttribute)? Modifying some of the print attributes (specifically ATTR_PRINT_AREA_HEIGHT and ATTR_PRINT_AREA_WIDTH or either of the offset attributes) may help put your picture in the correct place on the paper.
03-26-2009 04:05 PM
Basic setup...
SetPrintAttribute(ATTR_SYSTEM_PRINT_DIALOG_ONLY,1);
SetPrintAttribute(ATTR_ORIENTATION,1);
PrintPanel(phandle,"",1,VAL_FULL_PANEL,1);
The entrie panel prints fine except for left-y text on the graph control. Have changed size of the graph control just in case something was covering it. Set z-plane to front, etc.. No change. Did update the printer driver - this had no effect.
03-27-2009 02:53 AM
You may be trying to print on non-printable border Have you tried with a smaller graph or moving it a little rightwise on the panel?
Also, consider this note included in the online help for PrintPanel:
Note If the printout does not fit on the page, call SetPrintAttribute
before PrintPanel to change the settings as
follows:
03-27-2009 06:32 AM
03-27-2009 08:50 AM
If it's any comfort, you are not alone. I have the same issue with CVI 9.0(348) runtime.
It may be related to this issue, but then again it may not.
03-27-2009 12:12 PM
I don't think ruskin's problem is related to the bug that Martin linked to, since ruskin is also having the same problem with older versions of CVI. I believe this might be a printer driver issue -- some printer drivers don't support rotated text. I haven't seen this happen in a very long time, but a few years ago I remember it happening once or twice (with Epson printers, if I recall)
There are a couple of quick tests you can do which might shed some light on this:
1. Try putting a tab control in your panel temporarily, create a couple of empty tabs in it, and change the default location for the tabs so that they are on a vertical edge (either on the left or on the right). Let us know whether the tab labels print correctly.
2. Enable the bitmap printing option and let us know what happens.
Also, can you let us know exactly which printer driver(s), including the version if possible, you saw this problem with?
Thanks,
Luis