Problem with PDFXViewer not closing itself.
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 71
- Joined: Fri Mar 25, 2011 5:43 pm
Problem with PDFXViewer not closing itself.
Hi everyone, we got some problem with the PDFXViewer which seem normal after all but we need to know what to do to close the program here why.
First we use the pdfviewer is both way.
The first way work flawless , We show any pdf in a form and when we done we close the form and the viewer process is closed correctly. However, when we use the viewer in a form that we don't show it (with no showdialog() or show()). Just for use of its functionnality like print the process doesn't kill itself. Is there a way to force or close the pdfviewer since the control stay open even if we call the close on the form that is not showed.
First we use the pdfviewer is both way.
The first way work flawless , We show any pdf in a form and when we done we close the form and the viewer process is closed correctly. However, when we use the viewer in a form that we don't show it (with no showdialog() or show()). Just for use of its functionnality like print the process doesn't kill itself. Is there a way to force or close the pdfviewer since the control stay open even if we call the close on the form that is not showed.
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Problem with PDFXViewer not closing itself.
Can you send us simple example for reproducing the problem?
Thanks.
Thanks.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 71
- Joined: Fri Mar 25, 2011 5:43 pm
Re: Problem with PDFXViewer not closing itself.
I can't rapidly make a little projet for now, however can you just tell me if there is any way to close your program with any function?? or can you tell me what call the end of your program and in with circumstance. Like when the form is close or when the parent object being destroy.
thanks you guys!
thanks you guys!
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Problem with PDFXViewer not closing itself.
Try to remove(destroy) programmatically our control from your form before closing of form (in YourForm::OnClose() probably)...
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 71
- Joined: Fri Mar 25, 2011 5:43 pm
Re: Problem with PDFXViewer not closing itself.
Work now^^!, since the form was being destroy, all it's child did the same. However with the no showdialog method, the objet is not destroying itself. I was just missing the destructor my bad.Vasyl-Tracker Dev Team wrote:Try to remove(destroy) programmatically our control from your form before closing of form (in YourForm::OnClose() probably)...

Thanks for the tips!
-
- User
- Posts: 191
- Joined: Thu Jun 02, 2011 3:23 pm
-
- User
- Posts: 5
- Joined: Thu Dec 15, 2011 8:39 am
Re: Problem with PDFXViewer not closing itself.
Hi,
can you please provide me with more details about how to release (destroy) the ActiveX viewer component?
We have no problems when running on Windows, but on SuSe with Wine, when we open a dialog with viewer activeX component, everything goes pretty well until we close the dialog (using EndDialog(0) in OurViewerDialog::OnClose function) - the dialog closes, but the parent application, that called this dialog, freezes for a while and then crashes.
We've done a lot of inspection of our code, and the releasing of the viewer component seems to be a possible cause of this, so any help would be much appreciated.
Thanks in advance,
David
can you please provide me with more details about how to release (destroy) the ActiveX viewer component?
We have no problems when running on Windows, but on SuSe with Wine, when we open a dialog with viewer activeX component, everything goes pretty well until we close the dialog (using EndDialog(0) in OurViewerDialog::OnClose function) - the dialog closes, but the parent application, that called this dialog, freezes for a while and then crashes.
We've done a lot of inspection of our code, and the releasing of the viewer component seems to be a possible cause of this, so any help would be much appreciated.
Thanks in advance,
David
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Problem with PDFXViewer not closing itself.
Hello David,
While we do not officially support Wine - I will try to ask one of my colleagues form the dev team to take a look here and advise.
Best,
Stefan
While we do not officially support Wine - I will try to ask one of my colleagues form the dev team to take a look here and advise.
Best,
Stefan
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Problem with PDFXViewer not closing itself.
Hi, David.
Under WINE try to 'force' the destruction of control in YourForm::OnClose() event. Please let us known the result...
Thanks.
Normally the standard ActiveX control closes/destroys automatically at destroying of the parent window (form)....can you please provide me with more details about how to release (destroy) the ActiveX viewer component? ... on SuSe with Wine, when we open a dialog with viewer activeX component, everything goes pretty well until we close the dialog (using EndDialog(0) in OurViewerDialog::OnClose function) - the dialog closes, but the parent application, that called this dialog, freezes for a while and then crashes.
Under WINE try to 'force' the destruction of control in YourForm::OnClose() event. Please let us known the result...
Thanks.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 5
- Joined: Thu Dec 15, 2011 8:39 am
Re: Problem with PDFXViewer not closing itself.
Hello Vasyl.
During further examination I found that the problem is caused by DestroyWindow function used in code (called at the end of CloseDialog). Commenting it out seems to fix the crashes, as they no longer occur, dialog window closes and parent application stays alive.
But we noticed other weird issue when running under Wine. I am aware it is not officially supported, but hope you can have an idea of what is going wrong - since three weeks or so we are no longer able to receive any event of the ActiveX component. The OnEvent function is not fired at all, although it was before. We have checked really many times that the ActiveX registration was successful and no relevant changes have been made to code. We have also compared the code to the one in View example, but still have no clue. On Windows, however, everything goes well.
I really appreciate your help, although I know it is not easy. If you have any helping suggestions, I will be much obliged.
During further examination I found that the problem is caused by DestroyWindow function used in code (called at the end of CloseDialog). Commenting it out seems to fix the crashes, as they no longer occur, dialog window closes and parent application stays alive.
But we noticed other weird issue when running under Wine. I am aware it is not officially supported, but hope you can have an idea of what is going wrong - since three weeks or so we are no longer able to receive any event of the ActiveX component. The OnEvent function is not fired at all, although it was before. We have checked really many times that the ActiveX registration was successful and no relevant changes have been made to code. We have also compared the code to the one in View example, but still have no clue. On Windows, however, everything goes well.
I really appreciate your help, although I know it is not easy. If you have any helping suggestions, I will be much obliged.
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Problem with PDFXViewer not closing itself.
Hi, David.
What build are you using, exactly? For our ActiveX, are you using the standard installation-method or Registration-Less (Click-Once)?
Thanks.
Strange...- since three weeks or so we are no longer able to receive any event of the ActiveX component. The OnEvent function is not fired at all, although it was before.
What build are you using, exactly? For our ActiveX, are you using the standard installation-method or Registration-Less (Click-Once)?
Thanks.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 5
- Joined: Thu Dec 15, 2011 8:39 am
Re: Problem with PDFXViewer not closing itself.
We use build 2.5.199 of ActiveX component with standard installation (regserver + regsvr32) that is done automatically when app is running (we use this approach all the time since beginning). We have also compared registry entries on both machines, seeing no substantial difference (just library paths, that are, however, correct). As I already mentioned, everything else seems to work well, even the component's native zoom bar changes when zooming. But no events are fired to get processed by our code...(e.g. we would like to know when page/zoom value changes).Vasyl-Tracker Dev Team wrote: What build are you using, exactly? For our ActiveX, are you using the standard installation-method or Registration-Less (Click-Once)?
Regards,
David
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Problem with PDFXViewer not closing itself.
Please try latest build 200..
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 5
- Joined: Thu Dec 15, 2011 8:39 am
Re: Problem with PDFXViewer not closing itself.
Just tried it, unfortunately with no luck. Also tried to use your View example from AX_CExamples, with the MessageBox displaying in OnEvent function as the only change made. Neither this case was successful :/Vasyl-Tracker Dev Team wrote:Please try latest build 200..
Still can't imagine what could went wrong and stop events being fired...
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Problem with PDFXViewer not closing itself.
Hi David.
We have tested it but cannot reproduce any problem. The control fires all evens as should.
We have tried on:
Ubuntu 10.10, Wine 1.2.2 / Wine 1.3.36
Maybe you can help us in this case? Please create a VMware virtual machine with a reproducible problem, pack it using 7zip and please share it with us...
Best
Regards.
We have tested it but cannot reproduce any problem. The control fires all evens as should.
We have tried on:
Ubuntu 10.10, Wine 1.2.2 / Wine 1.3.36
Maybe you can help us in this case? Please create a VMware virtual machine with a reproducible problem, pack it using 7zip and please share it with us...
Best
Regards.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 5
- Joined: Thu Dec 15, 2011 8:39 am
Re: Problem with PDFXViewer not closing itself.
I'm sorry, unfortunately I'am not allowed to do that at the moment, as we use the Viewer in our library that is further bound to some other applications...
Is it possible to create a Viewer's debug log or something (maybe obtain a debug version of Viewer library) ?
As we made deeper investigation of our code and ATL communication, we learned that the communication preparing phase (DispEventAdvise, QueryInterface, FindConnectionPoint... ) seems to work just fine, as we obtain the ATL cookie set to 1 from the component (suggesting the server (component) is aware of our request as well as OnEvent method). But according to our log the problem seems to be in invoking our OnEvent method under Wine, because the ATL Invoke method doesn't get called at all, and neither does the OnEvent method.
Just to be clear, the OnEvent method does have correct syntax (all the input parameters, so as the HRESULT and __stdcall keyword). We use the same as in your View example, which fails to receive notifications as well...
Is it possible to create a Viewer's debug log or something (maybe obtain a debug version of Viewer library) ?
As we made deeper investigation of our code and ATL communication, we learned that the communication preparing phase (DispEventAdvise, QueryInterface, FindConnectionPoint... ) seems to work just fine, as we obtain the ATL cookie set to 1 from the component (suggesting the server (component) is aware of our request as well as OnEvent method). But according to our log the problem seems to be in invoking our OnEvent method under Wine, because the ATL Invoke method doesn't get called at all, and neither does the OnEvent method.
Just to be clear, the OnEvent method does have correct syntax (all the input parameters, so as the HRESULT and __stdcall keyword). We use the same as in your View example, which fails to receive notifications as well...
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: Problem with PDFXViewer not closing itself.
Hi David,
With the best will in the world - we have stated that as a windows based set of toolkits - we do not support Wine, and whilst we are happy to go the 'extra mile' to assist - that does require you to reciprocate.
We do not have a specific Debug version that would trace the calls indicated at this time and this would require the investment of time on our part - so repectfully and without wishing to appear unco-operative - if you want us to help, I believe the onus is on you to open up your project and allow us access as suggested if you require assistance and time to be invested by us ...
you state that the demo version also has this problem - if so, why not just set that up on a system and allow access ?
once you are in a position to do this - we would be happy to help
With the best will in the world - we have stated that as a windows based set of toolkits - we do not support Wine, and whilst we are happy to go the 'extra mile' to assist - that does require you to reciprocate.
We do not have a specific Debug version that would trace the calls indicated at this time and this would require the investment of time on our part - so repectfully and without wishing to appear unco-operative - if you want us to help, I believe the onus is on you to open up your project and allow us access as suggested if you require assistance and time to be invested by us ...
you state that the demo version also has this problem - if so, why not just set that up on a system and allow access ?
once you are in a position to do this - we would be happy to help
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com