LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Errors using Printpanel

When Printing a Panel with 'PrintPanel' occasionally the output contains errors.

The panel contains a graph that is being generated by 'PlotPolygon' during program-run, representing a round shape.
Sometimes the shape on the printed sheet contains peaks that were not appearing on the on-screen shape. I have read that sometimes there are problems using HP-printers and drivers. In my case a HP 1100 is in use. What can I do to solve the problem ??
0 Kudos
Message 1 of 4
(3,300 Views)
The PrintPanel function can print in two different modes: "Bitmap printing enabled" or "Bitmap printing disabled". With "Bitmap printing enabled" the panel is rendered as a bitmap and then sent as a standard .bmp file to the printer to reproduce. With "Bitmap printing disabled" the panel is rendered by sending common GDI graphical rending information that all printers should support if they are designed to work with Windows (unfortunately sometimes they do not).

The recommended way to go is with bitmap printing enabled if you are having image problems and two ways to enable it are as follows:

1) Use the following function call to enable it directly:

SetPrintAttribute (ATTR_BITMAP_PRINTING, 1);

2) Use the following functoin call to enable a CVI printing dialog that
allows you to select bitmap printing via a checkbox:

SetPrintAttribute (ATTR_SYSTEM_PRINT_DIALOG_ONLY, 0);

Have you tried printing with "Bitmap printing enabled"? This is usually the only way to get around the problems with some printer drivers not being able to properly implement the GDI commands created by the PrintPanel function for drawing the image on paper. If all else fails you can try using an older printer driver for your model, because it seems as though they implement GDI better than the newer ones.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 4
(3,300 Views)
Hi Jason
I actually also have problems with an HP690C printer on an NT4 System. I use the original printer driver from the NT CD.
I also used the bitmap printing mode, but with no success. The first print is always ok, but often the second print (or the third) is not correct. Mostly, the panel image does not fit on the page or the printer produces tons of garbage.
Is there a chance to fix the problem with an actual printer driver from HP?

Stephan
0 Kudos
Message 3 of 4
(3,300 Views)
Its worth a try, but again it is up to the driver to handle the common printing instructions properly and not be optimized for certain applications as is the case for alot of modern printer manufacturers.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 4 of 4
(3,300 Views)