Do you have any examples of embedding a viewer in a WPF form.
Regards
Andrea
Using PDF-XChange Viewer SDK from WPF
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Using PDF-XChange Viewer SDK from WPF
Hi, Andrea.
See the simple example in the attached archive and look to:
http://msdn.microsoft.com/en-us/library/ms742735.aspx
Best
Regards.
See the simple example in the attached archive and look to:
http://msdn.microsoft.com/en-us/library/ms742735.aspx
Best
Regards.
You do not have the required permissions to view the files attached to this post.
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: 51
- Joined: Wed Jun 16, 2010 2:54 pm
Re: Using PDF-XChange Viewer SDK from WPF
Thanks for this. Do you have any plans to develop a native WPF component or a native Windows forms component?
Andrea
Andrea
-
- User
- Posts: 51
- Joined: Wed Jun 16, 2010 2:54 pm
Re: Using PDF-XChange Viewer SDK from WPF
Thanks this sample works well. The documentation (PDF-XChange Viewer SDK) states that when you call for example OpenDocument it should return a result
HRESULT OpenDocument(BSTR SourceFileName,BSTR OpenPassword,LONG* ID,LONG Flags);
But the function in the sample code is a void function so how can I ensure the file is opened properly (Or does it just throw an exception instead or returning an error). Is this the case for all the functions?
I would also like to say thanks for your (very) speedy response to my questions so far.
Andrea
HRESULT OpenDocument(BSTR SourceFileName,BSTR OpenPassword,LONG* ID,LONG Flags);
But the function in the sample code is a void function so how can I ensure the file is opened properly (Or does it just throw an exception instead or returning an error). Is this the case for all the functions?
I would also like to say thanks for your (very) speedy response to my questions so far.
Andrea
Andrea
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Using PDF-XChange Viewer SDK from WPF
Hello Andrea,
Taken directly from the manual:
where S_OK is the generic HRESULT for success.
Best,
Stefan
Taken directly from the manual:
Code: Select all
Return Value
Returns S_OK if successful, or an error value otherwise. To obtain the text description of a
received error code, use GetTextFromResult.
Best,
Stefan
-
- User
- Posts: 51
- Joined: Wed Jun 16, 2010 2:54 pm
Re: Using PDF-XChange Viewer SDK from WPF
I agree that is what it says in the manual but from C# all functions have void types e.g
void AxCoPDFXCview.OpenDocument(string sourceFileName)
I have looked at your examples more thoroughly now and I think if the function fails it throws an exception which has to be handled instead of returning a result.
void AxCoPDFXCview.OpenDocument(string sourceFileName)
I have looked at your examples more thoroughly now and I think if the function fails it throws an exception which has to be handled instead of returning a result.
Andrea
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am