Follow on Google News News By Tag Industry News * saoftware * More Industries... News By Place Country(s) Industry News
Follow on Google News | ![]() How to convert PDF to JPG using VB .Net?I was looking for a solution to convert only first page of PDF document to JPG in VB.Net.
By: Yana We’ve online book store which sells electronic books in PDF format. We’ve had a task to automate whole process of converting 1st page to JPG. It was necessary that clients can see a book preview, read contents and annotation at our Website. I’ve successfully solved this task by the PDF Focus .Net component from SautinSoft company. With help of this library it’s very easy to create process of converting PDF to any images and specify any dpi. This is my code: 'Convert PDF 1st page to JPG file Dim f As New SautinSoft.PdfFocus() Dim pdfPath As String = "d:\journal.pdf" f.OpenPdf( If f.PageCount > 0 Then 'Let's convert 1st page from PDF document Dim image() As Byte = f.ToImage(System.Drawing.Imaging.ImageFormat.Jpeg, 1, 200) 'show image Response.Buffer = True Response.Clear() Response.ContentType = "image/jpeg" Response.AddHeader(" Response.BinaryWrite( Response.Flush() Response.End() End If Here you can find more about PDF Focus .Net: http://www.sautinsoft.com/ # # # SautinSoft is the independent software development company. The line of our software applications was started in 2002 (web-site www.sautin.com) End
|
|