Hi, i'm testing then Aspose Pdf.kit to evaluate the purchase of a license.
I have an aplication that uses pdf files and stores it in a SQL server table, I use a filestream to retrieve the documents from the database but I can't open it with the Aspose pdf kit. Can you give some tips to solve this problem??
Thanks!!!!
Here is the code I'm using for test:
Dim Archivo As Byte()
Dim Informes As DataSet
Dim Comando As SqlCommand
Dim Reader As SqlDataAdapter
comando = New SqlCommand()
Comando.Connection = Me.Conexion
Comando.CommandType = CommandType.Text
Comando.CommandText = "select * from blob where codigoacta = 1"
Reader = New SqlDataAdapter(Comando)
Informes = New DataSet
Reader.Fill(Informes)
ReDim Archivo(CType(Informes.Tables(0).Rows(0)("documento"), Byte()).Length)
Archivo = CType(Informes.Tables(0).Rows(0)("documento"), Byte())
Dim oFileStream As System.IO.FileStream
oFileStream = New System.IO.FileStream("test.pdf", System.IO.FileMode.Create, IO.FileAccess.ReadWrite)
oFileStream.Write(Archivo, 0, Archivo.Length)
Dim fileInfo As PdfFileInfo = New PdfFileInfo(oFileStream) (the error is here)
Dim height As Single = fileInfo.GetPageHeight(1)
Dim width As Single = fileInfo.GetPageWidth(1)
Dim rotation As Integer = fileInfo.GetPageRotation(1)
oFileStream.Close()