Access denied problem when using streams

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

mcanti
User
Posts: 10
Joined: Fri Apr 08, 2011 7:54 am

Access denied problem when using streams

Post by mcanti »

Hello,

I have a problem with the Viewer ActiveX. Please check the attached screenshot.

Do you know what the problem might be? Is it possible to find out the cause?
The problem can be reproduced in our application.

regards,
Cantemir
You do not have the required permissions to view the files attached to this post.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Access denied problem when using streams

Post by Stefan - PDF-XChange »

Hello Cantemir,

The error is an access violation - our Viewer is not allowed to write to the folder where you are telling it to.
So please make sure the path is correct and existing and test the permissions in your application before calling a save command in the Viewer.

Best,
Stefan
mcanti
User
Posts: 10
Joined: Fri Apr 08, 2011 7:54 am

Re: Access denied problem when using streams

Post by mcanti »

Hello,

we are using Streams. We don't specify any folder at all.
Could it be a temporary folder where the active X tries to do the saving?
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Access denied problem when using streams

Post by Stefan - PDF-XChange »

Hello Cantemir,

Yes by default when working with streams the Viewer will try to place the stream content into a temporary file before opening, but you can change this behaviour. Please see Objects::Documents::UseStreamsDirectly

Best,
Stefan
mcanti
User
Posts: 10
Joined: Fri Apr 08, 2011 7:54 am

Re: Access denied problem when using streams

Post by mcanti »

ok, i will take a look at Objects::Documents::UseStreamsDirectly

But where does the activex try to place the temporary files? In which directory?

Regards,
Cantemir
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Access denied problem when using streams

Post by Vasyl - PDF-XChange »

Hi, Cantemir.

1. When you passing stream to opening the activeX creates a temporary file and reads entire stream to this file and and "forgets" about your input stream.
2. When you specified the documents.UseStreamsDirectly before opening from streams then activeX creates a temporary file and reads entire stream to this file AND keeps reference to your input stream for possible direct saving from the temp file to your stream in the future... This reference will be closed after closing of document.

The control stores the content of the stream to <UserTempFolder>\pxs*.tmp

About your problem: can you provide simple example so we can reproduce here - please ensure an example is compiled, source code is also provided - without any licensing info and all files are zipped ?

HTH.
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.