I just got it to work.
I used a fileStream to write the file.
I wrote the text portion using:Code:Private wfStream As FileStream Private mBytes() As Byte wfStream = New FileStream(ReportFileName, FileMode.Create, FileAccess.Write)
The images were written to the file using:Code:mBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(strPDF) wfStream.Write(mBytes, 0, mBytes.Length)
Code:Dim retByte() As Byte Dim fs As FileStream = New FileStream(ImageFileName, FileMode.Open) ReDim retByte(fs.Length) Dim binReader As BinaryReader = New BinaryReader(fs) retByte = binReader.ReadBytes(fs.Length) binReader.Close() fs.Close() 'write the raw image data. wfStream.Write(retByte, 0, retByte.Length)![]()




Reply With Quote