Printing Freeze


Recommended Posts

I have the following code

?" Print Active"

?"Customer = " + customer


Page.Capture("Report2","E:\DAQ Truck\"+customer+".jpg")

?"Image printed"



?"Test Page Sent"


?"Main Page Print"


?"Printing Finnished"

I am actually trying to print 'Report2'

this is actually quite a complex page with 3 real time graphs.

The page "Record Change" is a simple page with just 3 buttons.

the page capture works just fine, but the resolution is not quite there even with a high image size,

we are looking to print to a PDF printer 'Cute PDF' as it's free and then allow the end user to print to laser is require from withing the PDF Viewer.

Initially for testing the default print is a local Laser.

The Page.PrintPageDirect("Record_Change") command completes but prints a blank page.

The Page.PrintPreview("Report2") opens a blank Preview and then freezes ??

I have to terminate DAQ via Task manager (Not Responding)

Link to comment
Share on other sites

Unfortunately printing with DAQFactory can have its issues. It has to do with how DAQFactory draws its screens and how some printers process scaling. Here are some general pointers:

1) in this case, the pdf generator is actually just a little slower than most printer drivers and causing the drawing routine to interfere with printing. The solution is to set the interval of the page you are printing to 0 before you print (or always). You can change the interval by doing

page.mypage.interval = 0

from script, or by right clicking on the page name in the workspace and selecting properties. If you have a page with interval = 0, it will refresh when you go to the page, when the mouse clicks, or in script you can trick it to refresh by doing:

page.strCurrentPage = page.strCurrentPage

2) some controls don't print well. Date/time edit, combo boxes and general edit boxes in particular. If you are having troubles, eliminate these.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.