Home > database >  Call pdfcreator to generate PDF file, how to determine pdfcreator finished printing task?
Call pdfcreator to generate PDF file, how to determine pdfcreator finished printing task?

Time:09-26

Pb9.0 task: to print to PDF files, a data window
My code is as follows:

OleObject objPdfCreator
ObjPdfCreator=create OleObject
IRtn=objPdfCreator. ConnectToNewObject (" PDFCreator. ClsPDFCreator ")
. (omit intermediate code)
BFinish=FALSE
Dw_1. Print ()
The Do while true
The Yield ()
if bFinish=TRUE then//!!!!!!!!!!!!!!!!!!!
The exit
The else
Sleep (1)
The continue
End the if
Loop

More than how to keep the complete event pdfcreator modify bFinish=TRUE? I've seen pdfcreator vb.net routines, as follows:
Private Sub PDFCreator_Ready () Handles _PDFCreator. EReady
ToolStripStatusLabel1. Text="Status:" "" & amp; _PDFCreator. COutputFilename & amp; "" "was created!"
_PDFCreator. CPrinterStop=True
ReadyState=True
End Sub
Estimate "PDFCreator clsPDFCreator" of "Public Event eReady ()" Event, namely printing finish,

Help you master, how do I use pb complete the above vb.net print trigger function?

Thank you very much! I'm sorry, there has been no points, can't send, please feel free to comment!

CodePudding user response:

If pdfcreator is the virtual printer, check the status of a print job to determine whether finished printing,
http://topic.csdn.net/u/20080802/17/ea45ba21-10f8-402c-a27f-9e65d8041c57.html

CodePudding user response:

Good article, can you specify the path to save as a PDF file,
  • Related