Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Tue Sep 30, 2014 8:57 am

Dim strFileNm As IO.MemoryStream
Dim arrPDF As Byte()
arrPDF = ds.Tables(0).Rows(0)("ATTCH_DOC")
strFileNm = New IO.MemoryStream(arrPDF)
pdfDocumentViewer1.LoadFromStream(strFileNm)

when i view the pdf the file is loading but in white blank.

louis
 
Posts: 14
Joined: Mon Sep 08, 2014 10:29 am

Tue Sep 30, 2014 9:10 am

Dear louis,

Thanks for your inquiry.

Please upload the pdf file or send it to burning.liu@e-iceblue.com.

Best regards,
Burning
E-iceblue Support Team.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Tue Sep 30, 2014 9:49 am

i already mailed the file yo you

louis
 
Posts: 14
Joined: Mon Sep 08, 2014 10:29 am

Wed Oct 01, 2014 2:12 am

Dear louis,

Thanks for your reply.

I have tested the pdf file you sent me and there is no white blank here.
Perhaps it's just pdf render slow. Please wait some seconds.

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Oct 01, 2014 2:17 am

By using pdfDocumentViewer1.LoadFromStream()?

louis
 
Posts: 14
Joined: Mon Sep 08, 2014 10:29 am

Wed Oct 01, 2014 2:29 am

Dear louis,

Thanks for your reply.

Yes. And here is my code snippet:
Code: Select all
Dim array As Byte() = File.ReadAllBytes("SK-SP-16.pdf")
Dim ms As New MemoryStream(array)
pdfDocumentViewer1.LoadFromStream(ms)

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Oct 01, 2014 2:40 am

how about if i stream from varbinary?

Dim adp As SqlDataAdapter
Dim ds As New DataSet
Dim strFileNm As IO.MemoryStream
Dim arrPDF As Byte()
Dim intPDFCount As Integer = 0

Try
StrSql = "SELECT ATTCH_DOC FROM ATTCH_WRK "
StrSql += "WHERE ATTCH_WRKNO = '" & Me.WorkTableNo & "' "
StrSql += "AND ATTCH_REFID = '" & dgvATTCH.CurrentRow.Cells("ATTCH_REFID").Value.ToString & "'"
adp = New SqlDataAdapter(StrSql, Con)
adp.Fill(ds)

If ds.Tables.Count > 0 Then
For intPDFCount = 0 To ds.Tables(0).Rows.Count - 1
If ds.Tables(0).Rows(0)("ATTCH_DOC") Is DBNull.Value Then
Else
arrPDF = ds.Tables(0).Rows(0)("ATTCH_DOC")
strFileNm = New IO.MemoryStream(arrPDF)
pdfDocumentViewer1.LoadFromStream(strFileNm)
End If
Next
End If

Catch ex As Exception
MsgBox(ex.Message)
Finally
adp = Nothing
ds = Nothing
strFileNm = Nothing
arrPDF = Nothing
End Try

louis
 
Posts: 14
Joined: Mon Sep 08, 2014 10:29 am

Wed Oct 01, 2014 3:10 am

Dim array As Byte() = File.ReadAllBytes("C:\Users\admin\Desktop\PDF Attachment\Quality Procedure\SK-SP-16.pdf")
Dim ms As New MemoryStream(array)
pdfDocumentViewer1.LoadFromStream(ms)

louis
 
Posts: 14
Joined: Mon Sep 08, 2014 10:29 am

Wed Oct 01, 2014 5:31 am

Previously i using trial version for development. After i bought the license, in just update the project.

louis
 
Posts: 14
Joined: Mon Sep 08, 2014 10:29 am

Wed Oct 01, 2014 6:34 am

Dear louis,

Sorry for the problem you encounterd.
I have posted this issue to our dev team. We will inform you as soon as it is resolved.

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Oct 02, 2014 3:26 am

I have tried a lot ways. When i set the project as start up it can load but still will become white page if i view to the end of the page. If i call the project from the solution, the pdf totally become white page only.

louis
 
Posts: 14
Joined: Mon Sep 08, 2014 10:29 am

Thu Oct 02, 2014 4:25 am

Hello,

Thanks for sharing the information.
Our Dev team will investigate, once there are any progress, we will let you know ASAP.
If there are any questons, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed Oct 08, 2014 1:50 am

Dear louis,

Sorry for the delay response.

Our dev team has confirmed this issue and will go to fix it.
We will inform you if there is any update.

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Oct 08, 2014 3:30 am

thanks.

louis
 
Posts: 14
Joined: Mon Sep 08, 2014 10:29 am

Mon Oct 13, 2014 8:50 am

Dear louis,

We have released an new version of Spire.PDFViewer to fix your problem, please download it via link below:
http://www.e-iceblue.com/downloads/hot_ ... 2.3.23.zip

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.PDFViewer