LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing the new Table Control

I have problem trying to print the new table control (release 5.5).
The number of row does not match the one visualized on the screen.
Please give me a help.
Thank you in advance.

Ciao

Paolo
0 Kudos
Message 1 of 3
(3,145 Views)
When you send a request to print using the PrintCtrl() and PrintPanel() commands in LabWindows/CVI, the data will be modified and/or optimized by your print driver for page area. This causes what you see as a discrepancy between what is viewed on the screen and what is actually printed. In order to fix this you should use the SetPrintAttribute() command to set the print area height and print area width.

SetPrintAttribute (ATTR_PRINT_AREA_HEIGHT, VAL_INTEGRAL_SCALE);
SetPrintAttribute (ATTR_PRINT_AREA_WIDTH, VAL_INTEGRAL_SCALE);

When applied to either the height or the width, VAL_INTEGRAL_SCALE ensures that the ratio between the object's height and width in dots on the hardcopy is the same as the ratio between the height and width in pixels on the screen.
This prevents distortion.
Using VAL_INTEGRAL_SCALE also ensures that, for both the height and width, the number of dots on the hardcopy is an integral multiple of the number of pixels on the screen. This prevents aliasing, in which screen lines are lost or duplicated in an uneven manner.

You may also replace VAL_INTEGRAL_SCALE with a number, which represents the height or width in millimeters/10. When doing this you must set the height and width values such that the ratio of these values is unaffected. For example, if your panel is
600 x 800 you must maintain a ratio of 600/800, or 3/4.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,145 Views)
Paolo,

Please reference KnowledgeBase 2S299IQ8, titled "Effectively Using PrintPanel() and PrintCtrl()". This KnowledgeBase describes using the SetPrintAttribute (ATTR_BITMAP_PRINTING, 1) command to use the Bitmap method of printing. This should clear up your issue.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,145 Views)