Hello,
How to open document using IStreamWrapper without loading file in pdfcontrol?
Here is my sample:
Dim clbk As AuthCallback_Pwd_PDF = New AuthCallback_Pwd_PDF()
Dim Doc As PDFXEdit.IPXC_Document '= m_pxcInst.OpenDocumentFromFile(path, clbk)
Dim _FileMemorystream As New MemoryStream
Dim blnReturn As Boolean
blnReturn = ReadFileStream(_FileMemorystream, IO.Path.GetFileName(Path), 3)
If (_FileMemorystream IsNot Nothing) Then
Dim srcIStream As IStreamWrapper = New IStreamWrapper(_FileMemorystream)
Doc = m_pxcInst.OpenDocumentFrom(srcIStream, clbk) -----> Here it gives exception "Exception from HRESULT: 0x82140002"
End If
Regards.
how to open document?
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: how to open document?
Hello vivekpatel,
I've confirmed this behavior - we'll see whether we can come up with the solution.
Cheers,
Alex
I've confirmed this behavior - we'll see whether we can come up with the solution.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: how to open document?
Hello vivekpatel,
Can you please show the implementation of your IStream.RemoteRead method.
Cheers,
Alex
Can you please show the implementation of your IStream.RemoteRead method.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 141
- Joined: Sat Aug 27, 2016 11:00 am
Re: how to open document?
Hello,
Here i'm sending my IstreamWrapper file.
code:
Dim clbk As AuthCallback_Pwd_PDF = New AuthCallback_Pwd_PDF()
Dim Doc As PDFXEdit.IPXC_Document '= m_pxcInst.OpenDocumentFromFile(path, clbk)
Dim _FileMemorystream As New MemoryStream
Dim blnReturn As Boolean
blnReturn = ReadFileStream(_FileMemorystream, IO.Path.GetFileName(Path), 3)
If (_FileMemorystream IsNot Nothing) Then
Dim srcIStream As IStreamWrapper = New IStreamWrapper(_FileMemorystream)
Doc = m_pxcInst.OpenDocumentFrom(srcIStream, clbk)
End If
Here i'm sending my IstreamWrapper file.
code:
Dim clbk As AuthCallback_Pwd_PDF = New AuthCallback_Pwd_PDF()
Dim Doc As PDFXEdit.IPXC_Document '= m_pxcInst.OpenDocumentFromFile(path, clbk)
Dim _FileMemorystream As New MemoryStream
Dim blnReturn As Boolean
blnReturn = ReadFileStream(_FileMemorystream, IO.Path.GetFileName(Path), 3)
If (_FileMemorystream IsNot Nothing) Then
Dim srcIStream As IStreamWrapper = New IStreamWrapper(_FileMemorystream)
Doc = m_pxcInst.OpenDocumentFrom(srcIStream, clbk)
End If
- Attachments
-
- IStreamWrapper.rar
- (1.2 KiB) Downloaded 73 times
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: how to open document?
Hello vivekpatel,
Try debugging the IStream_Read method and see whether it correctly reads the data from the stream and also if no exceptions occur.
Cheers,
Alex
Try debugging the IStream_Read method and see whether it correctly reads the data from the stream and also if no exceptions occur.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ