About Option UseStreamsDirectly

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

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

defcon8808
User
Posts: 64
Joined: Sat Dec 13, 2014 6:59 am

About Option UseStreamsDirectly

Post by defcon8808 »

Hello.

i find issue stream read method.

* find issue

Code: Select all

AxCoPDFXCView1.SetProperty("Documents.UseStreamsDirectly", "True", 0)
1. stream open PDF file(testing PDF File size 1.5GB)
2. Loading Data from Stream..
3. Loaded 200.3 MB .... 380.3 MB ... 415.4 MB is done.
4. Occur Error. Message is "Source Storage Wrong".

* Issue Replay(Programming Language is VB.NET)
- VBNETExample : OpenDocumentFromStream

Code: Select all

Dim nFlags As Integer = 0

        Dim vDataIn As Object = ""
        Dim vArr(2) As Object

        Dim readStream As FileStream
        readStream = New FileStream(TextBoxSourceFileName.Text, FileMode.Open)

        Try
            '<Issue Point>"FALSE" is not occur issue. "TRUE" is occur issue.(Open Lager PDF File)</Issue Point>
            AxCoPDFXCview1.SetProperty("Documents.UseStreamsDirectly", "TRUE", 0)
        Catch ex As Exception

        End Try

        Dim istr As IStreamWrapper = New IStreamWrapper(readStream)
        Dim varg1 As Object = istr
        Dim varg2 As Object = TextBoxPassword.Text
        vArr(0) = varg1
        vArr(1) = varg2
        vDataIn = vArr


        Dim OutPar As Object = Nothing
        Try

            AxCoPDFXCview1.DoVerb(Nothing, "OpenDocument", vDataIn, OutPar, nFlags)

        Catch ex As Exception

            ShowErrorMessage(System.Runtime.InteropServices.Marshal.GetHRForException(ex))
        End Try

        readStream.Close()
You do not have the required permissions to view the files attached to this post.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17949
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: About Option UseStreamsDirectly

Post by Tracker Supp-Stefan »

Hello defcon8808,

It seems like you are using 32 bit code - in that case - most likely you are running out of memory as your file is huge.

Regards,
Stefan