Code sample "OpenDocumentFromStream" does not work correctly

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

ebbiTeam
User
Posts: 17
Joined: Fri May 27, 2011 7:20 am

Code sample "OpenDocumentFromStream" does not work correctly

Post by ebbiTeam »

Hello,

I have tested out your "OpenDocumentFromStream"-sample (vb.net) because I have to load pdfs from stream. As it figured out the code doesn't work the right way.

Code: Select all

AxCoPDFXCview1.DoVerb(Nothing, "OpenDocument", vDataIn, OutPar, 0)
vDataIn contains the IStreamWrapper with the read stream as first argument.
Now after selecting a pdf document(with the .net native file dialog), the file open dialog from your viewer component is showing up and let's me chose a pdf document again! Now this one is loaded into the viewer and the memory stream was ignored.
After debugging this behaviour I have found out, that the memory stream doesn't matter at all... This way the code sample doesn't make any sense for me...what is going wrong?

Thanks for your help
ebbiTeam
ebbiTeam
User
Posts: 17
Joined: Fri May 27, 2011 7:20 am

Re: Code sample "OpenDocumentFromStream" does not work corre

Post by ebbiTeam »

Hello once again.

I have now tested the sample on my home computer and there it is working exactly how it should be.
The file open dialog is only coming up once and after selecting the document it will show.

Can you tell what could be the problem at my firms' system?
Jamie - Tracker Supp
User
Posts: 191
Joined: Thu Jun 02, 2011 3:23 pm

Re: Code sample "OpenDocumentFromStream" does not work corre

Post by Jamie - Tracker Supp »

Hey EbbiTeam,

There can be so many differences between dev enviroments that it's hard to nail challenges like this down. One thing I can think of off the top of my head would be to make sure you are using the same .net framework in both enviroments.

Cheers,
J.
ebbiTeam
User
Posts: 17
Joined: Fri May 27, 2011 7:20 am

Re: Code sample "OpenDocumentFromStream" does not work corre

Post by ebbiTeam »

Is it also possible that there's a problem with the license?
We have already bought one of your components 3 years ago:
PDF Tools SDK Default Version: 4.0174

With this component we have an implementation of a module in our software.
The software is installed on this computer and of course the dlls from the bought component too.
For testing the sample I have also installed your actual pdf viewer package with the included dlls for testing.

Could there be a problem with this configuration?

Regards
Tobias Herold
ebbiTeam
User
Posts: 17
Joined: Fri May 27, 2011 7:20 am

Re: Code sample "OpenDocumentFromStream" does not work corre

Post by ebbiTeam »

I've found out the problem.
As I assumed, there was a problem with the license.
To solve this issue I simply deinstalled the test version and reinstalled it again.
Now it works perfectly. :D
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Code sample "OpenDocumentFromStream" does not work corre

Post by Stefan - PDF-XChange »

Hello Tobias,

Great to hear!
Then this one is resolved right?

Cheers,
Stefan