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
I am using PDF XChange Viewer-ActiveX SDK , version 2.5.214.2 in my own VB .NET application where I am loading a PDF from a FileStream into a PDFXCStream (like in your VBNETExample OpenDocumentFromStream) with the following function:
PublicFunctionPDFLoadIntoPDFXCStream(ByVal PDFilePath As String, Optional PDFileOpenPassword As String = "")AsObjectImplementsIMainPresenter.PDFLoadIntoPDFXCStreamDim_MemoryStreamAsIO.MemoryStreamDim_FileStreamAsIO.FileStreamDim_PDFXCStreamAsIStreamDimoDataOut(1)AsObjectTryIfString.IsNullOrEmpty(PDFilePath)ThenThrowNewArgumentNullException("PDFilePath", "Es wurde keine PDF zum Laden in den Speicher übergeben!")_MemoryStream = NewIO.MemoryStream_FileStream = NewIO.FileStream(PDFilePath, IO.FileMode.Open, IO.FileAccess.Read)
'#THK# 20.11.2013 ÜbergebenePDFinSpeicherkopieren, damitdiesespäter überschriebenwerdenkann_FileStream.CopyTo(_MemoryStream)Debug.WriteLine("PDFLoadIntoPDFXCStream - Close FileStream")_FileStream.Close()
'#THK# 20.11.2013 PDFausdemSpeichernineinPDFXCStream-Objektladen(notwendig für PDF-XChange Viewer Steuerelement)_PDFXCStream = Logic.Factory.CreatePDFXCStream(_MemoryStream)oDataOut(0) = _PDFXCStreamoDataOut(1) = PDFileOpenPasswordReturnoDataOutCatchexAsSystem.ExceptionThrowNewException("FEHLER in PDFLoadIntoPDFXCStream: " + ex.Message)ReturnNothingEndTryEndFunction
As a result of the function I am getting a PDFXCStream which I am displaying in the view(PDF-XChange Viewer control on windows form) where one user adds one or more annots(mostly rectangle annots). After the user has finished he closes the PDF and I save the loaded PDFXCStream with the annot over the original PDF file. For reviewing the overwritten PDF file I load it one second later with the OpenDocument method but then the PDF-XChange Viewer control on the windows form crashes unregular with the Windows error message "PDF-XChange Viewer has encountered a problem and needs to close". If I open the same file in a row it crashes unregular at one of my tries so I can not find a regularity which makes it harder to reproduce the error.
I don't understand it and hope you can find something out from my attached error reports.
Thanks
Karl
You do not have the required permissions to view the files attached to this post.
or reviewing the overwritten PDF file I load it one second later with the OpenDocument method but then the PDF-XChange Viewer control on the windows form crashes unregular
1. The v2.5.214 is old. Please update to the latest and try reproduce it again.
2. Please be sure that overwriting of original pdf-file is finished exactly, before opening. Do you using multiple threads for saving/opening files?
3. Please check if problem is depended on file or not. Try any other file (new, blank for example).
4. You may create dump-file of crash (with latest version of our SDK), upload it to any public ftp and provide link to it...
5. Also the simple example for reproducing this issue - will be very helpful for us. It may dramatically decrease time of trouble fixing..
Best
Regards.
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.
thank you for your fast answer and sorry for my late answer!
I have tested the current PDF-XChange Viewer Active SDK, version 2.5.309.0 and the problem still exists. My problem is that I can't exactly reproduce the error on my development computer running Windows 7 x64 but it crashes very often on the client computer running Windows XP x32.
If I do a remote debugging in VB .NET it does not jump to any line in the source code, normally it does but here it generates only Windows error reports.
I will write a simple example and try to reproduce the error!
At the meantime thank you for your help, I will update this post as soon as I found something new