Errorhandling
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 35
- Joined: Mon Oct 17, 2011 2:36 pm
Errorhandling
When I open a file which is no pdfdocument i get an error message from the activex controll and when i close this message i get an second message from my exception. Is it possible to deactivate the messages from the sdk? If not can I edit/catch them.
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Errorhandling
Hello abc123,
Please do have a look at the Manual/Help for the Viewer AX - and particularly the "3.1 How to Open a Document?" section -
There are code snippets in several programming languages. If yours supports it you should definitely be including the open document command in a try...catch statement, and this will correctly rise error codes when the operation is unsuccessful.
Best,
Stefan
Tracker
Please do have a look at the Manual/Help for the Viewer AX - and particularly the "3.1 How to Open a Document?" section -
There are code snippets in several programming languages. If yours supports it you should definitely be including the open document command in a try...catch statement, and this will correctly rise error codes when the operation is unsuccessful.
Best,
Stefan
Tracker
-
- User
- Posts: 35
- Joined: Mon Oct 17, 2011 2:36 pm
Re: Errorhandling
I tried this. And the result was that i get the error message like before and after this message i jump into the exception.
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Errorhandling
Are you trying to open this "non-pdf" file via code or via the UI of the AX?
Best,
Stefan
Best,
Stefan
-
- User
- Posts: 35
- Joined: Mon Oct 17, 2011 2:36 pm
Re: Errorhandling
Via code. I have my own opendialog which gives me the filepath. Then I want to open this selected document. But if this is no-pdf-file i get this errormessage:Error opening document "C:\...\*.nopdf": Unknown error: 0x00CE556
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Errorhandling
Use special flag PXCVA_NoUI.
Example:
Example:
Code: Select all
pdfViewer.OpenDocument(fileName, ..., PXCVA_NoUI);
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.