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