Hi,
I have a pdf document which has some error on the page is shown clearly when I opened through acrobat PDF viewer. (exact message from acrobat : "An error exists on this page. Acrobat may not display the page correctly. Please contact .....")
When same pdf is opened from the PDF-XChange Viewer it is not throwing any error. But, when we execute RugJavaScript() using below command, which is freezing the viewer at exactly the same page where the error occurred through acrobat.
axViewer.RunJavaScript("GetCurrentPage();", out sViewerPage, 0, 0)
from my .Net code, the control is not coming out of that line. It seems there is some kind of stack overflow occurred in that line.
Can you please guide me on how to fix that ?
Thanks
Rama
Error on pdf page is freezing the RunJavaScript("GetPage..")
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 6
- Joined: Tue Oct 06, 2015 4:17 pm
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Error on pdf page is freezing the RunJavaScript("GetPage
Hi, Rama.
Looks like that your issue is document-related because "GetCurrentPage();" isn't a standard feature but must be declared globally or by document-scripts..
Also message "An error exists on this page. Acrobat may not display the page correctly. Please contact ....." - in most case it tells you that document is broken. In some cases our PDF-Viewer may solve silently non-critical issues with document.
Possible workaround: try to call RunJavaScript with PXCVA_Sync flag specified.
If this workaround will not help you - can you provide simple document to reproduce this issue?
Cheers.
Looks like that your issue is document-related because "GetCurrentPage();" isn't a standard feature but must be declared globally or by document-scripts..
Also message "An error exists on this page. Acrobat may not display the page correctly. Please contact ....." - in most case it tells you that document is broken. In some cases our PDF-Viewer may solve silently non-critical issues with document.
Possible workaround: try to call RunJavaScript with PXCVA_Sync flag specified.
If this workaround will not help you - can you provide simple document to reproduce this issue?
Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 6
- Joined: Tue Oct 06, 2015 4:17 pm
Re: Error on pdf page is freezing the RunJavaScript("GetPage
Thank you so much for your prompt response.
Can you please provide me code snippet on how to setup that flag.
I was checking through the properties of the AxCoPDFXCview object and also the RugJavaScript method. I could not able to find any documentation on how to setup that.
Thanks,
Rama
Can you please provide me code snippet on how to setup that flag.
I was checking through the properties of the AxCoPDFXCview object and also the RugJavaScript method. I could not able to find any documentation on how to setup that.
Thanks,
Rama
-
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Error on pdf page is freezing the RunJavaScript("GetPage
Hello Rama,
Please take a look here:
Viewer v2.5 ActiveX SDK > Reference > Interfaces > IPDFXCview > General Methods > RunJavaScript
The flags is the last input parameter that you can specify to the RunJavaScript method.
Regards,
Stefan
Please take a look here:
Viewer v2.5 ActiveX SDK > Reference > Interfaces > IPDFXCview > General Methods > RunJavaScript
The flags is the last input parameter that you can specify to the RunJavaScript method.
Regards,
Stefan
-
- User
- Posts: 6
- Joined: Tue Oct 06, 2015 4:17 pm
Re: Error on pdf page is freezing the RunJavaScript("GetPage
Hi,
I tried with that option and still freezing.
I am attaching the sample document. Please let me know, if you need more information.
I am using PDFXCview.exe version 2.5.208. Is it something got fixed in the later versions.
Please let me know.
Thanks
Rama
I tried with that option and still freezing.
I am attaching the sample document. Please let me know, if you need more information.
I am using PDFXCview.exe version 2.5.208. Is it something got fixed in the later versions.
Please let me know.
Thanks
Rama
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Error on pdf page is freezing the RunJavaScript("GetPage
Hi, Rama.
The version 2.5.208 is too old. We cannot reproduce your issue with the latest build, even with your sample document.
The latest build is 2.5.316, so please update to it and try again...
Also please use try/catch because calling of RunJavaScript may generate COM-exception when any error occurred (invalid/unknown script) (its common/standard way for all COM-objects to throw any error):
Also you may try to reproduce issue with our simple example:
"<Program Files>\Tracker Software\PDF-XChange Viewer SDK\Bin\AX_C#Examples\JavaScript.exe"
HTH.
The version 2.5.208 is too old. We cannot reproduce your issue with the latest build, even with your sample document.
The latest build is 2.5.316, so please update to it and try again...
Also please use try/catch because calling of RunJavaScript may generate COM-exception when any error occurred (invalid/unknown script) (its common/standard way for all COM-objects to throw any error):
Code: Select all
try
{
axCoPDFXCview1.RunJavaScript(....);
}
catch (Exception ex)
{
}
"<Program Files>\Tracker Software\PDF-XChange Viewer SDK\Bin\AX_C#Examples\JavaScript.exe"
HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.