I use image object to save image (jpg file) into SQL varbinary column as code below. It works fine.
Now, I need to insert pdf file but Imaging.ImageFormat do not have pdf option.
How to insert pdf file?
Using picture As Image = Image.FromFile(sImagePath & "\" & PDFFile & ".pdf")
Using stream As New IO.MemoryStream
picture.Save(stream, Imaging.ImageFormat.Jpeg)
Now, I need to insert pdf file but Imaging.ImageFormat do not have pdf option.
How to insert pdf file?
Using picture As Image = Image.FromFile(sImagePath & "\" & PDFFile & ".pdf")
Using stream As New IO.MemoryStream
picture.Save(stream, Imaging.ImageFormat.Jpeg)