LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get 'PrintTextFile ()' to recognize form feeds

What I was trying to accomplish with the lock was to get all of the "associated" print jobs in the queue at the same time (with no unrelated jobs in between them). This may not be possible depending on how your network printer handles the job queue but it works here. (By the way, you are never acquiring the lock you are creating, and you are never discarding it. You need to call CmtGetLock instead of CmtNewLock; you should call CmtNewLock somewhere else and CmtDiscardLock at the end of the program. You can look at the usage in my example if you want.)

This may not be perfect, but its the best solution that I can think of. I'd be interested to see if you modify my example to print a report generated by your applica
tion if it works or if you have issues.

Regards,

-alex
0 Kudos
Message 11 of 12
(1,072 Views)
Ok, I've got the mutex creation and discard calls in the startup and cleanup section of the application and everything seems to work fine except for the multiple print jobs. Since there are many users of the network printer, I still have no control print job interleaving except within my own application.

This is still a temporary workaround and until I can do the print as a single job, I don't consider the problem solved.

The sad thing is that it probably would have cost NI less to fix the form-feed problem than the resources that I have expended trying come up with a workaround that still does'nt solve the whole problem. So much (or should I say 'little') for customer support at NI.
0 Kudos
Message 12 of 12
(1,072 Views)