Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: Problems with syncronizing annotations when printing
Started by dhoehnle at 11-07-2007 16:33. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  11-07-2007, 16:33
dhoehnle is not online. Last active: 10/1/2007 10:57:59 PM dhoehnle

Not Ranked
Joined on 04-02-2007
Posts 4
Problems with syncronizing annotations when printing
Reply Quote

I am having an issue printing from a web interface. I am using a hyperlink to define a set of annotations on an image. The problem arises when the hyperlink does not resolve quickly enough and the image prints without applying the annotations. How can I sychronize the operations so that I can be assured that all the required work is done before I send the item off to the printer. I am currently using a timeout but varying users are having issues with performance from one environment to another. The documentation is pretty sketchy around this topic.

 Private Sub LEAD1_BitmapDataPathClosed() 

   Dim timeOut, iTimerID

   timeOut = 250 'timeOut to let LEAD apply redactions

   iTimerID = -2

If Not UCase(sAnnotationURL) = "NO_REDACTION_DEFINED"

   Then LEAD1.AnnDataPath = sAnnotationURL

   iTimerID = window.setTimeout("Call_Print", timeOut, VBScript) 'We need to sit here for bit to let LEAD apply the redaction

Else LEAD1.AnnDataPath = ""

Call_Print

End If

 End Sub


   Report 
  11-08-2007, 7:42
Qasem Lubani is not online. Last active: 9/2/2008 11:31:52 AM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,044
Re: Problems with syncronizing annotations when printing
Reply Quote
You should be able to detect when the annotations have finished loading from a web link using the ReadyState property and the ReadyStateChange event.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  11-08-2007, 13:05
dhoehnle is not online. Last active: 10/1/2007 10:57:59 PM dhoehnle

Not Ranked
Joined on 04-02-2007
Posts 4
Re: Problems with syncronizing annotations when printing
Reply Quote

Sorry for being obtuse but how? I have called out readyState at  the readyStateChangeEvent and it always comes up as "4" - never anything else. How does one differentiate from a call to readyStateChanged from loading the bitmap to loading the annotation?

Private Sub LEAD1_ReadyStateChange(ReadyState)

   msgBox Lead1.readyState & " changed"

End sub

 


   Report 
  11-08-2007, 14:25
dhoehnle is not online. Last active: 10/1/2007 10:57:59 PM dhoehnle

Not Ranked
Joined on 04-02-2007
Posts 4
Re: Problems with syncronizing annotations when printing
Reply Quote
Never mind. I got it. I used a global variable to determine the phase of the workflow and did work in ReadyStateChange based on the state of that variable instead of ReadyState. It feels like a hack but its working better than the timeout
   Report 
Post
LEAD Support Fo... » Developer » Printing » Re: Problems with syncronizing annotations when printing

Powered by Community Server, by Telligent Systems