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.
 
 
Spread the Word
Listed Under

Tags:
* Pdf To Jpg
* Vb Net

Industry:
* saoftware

Location:
* Votkinsk - Udmurt Republic - Russian Federation

Oct. 14, 2011 - PRLog -- I was looking for a solution to convert only first page of PDF document to JPG in VB.Net.
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(pdfPath)

     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("Content-Disposition:", "attachment; filename=Page1.jpg")
           Response.BinaryWrite(image)
           Response.Flush()
           Response.End()
       End If

Here you can find more about PDF Focus .Net: http://www.sautinsoft.com/products/pdf-focus/convert_pdf_...

# # #

SautinSoft is the independent software development company. The line of our software applications was started in 2002 (web-site www.sautin.com) and now developing components for converting such formats as: HTML, RTF, PDF, Word and others.
End
Source:Yana
Email:***@sautinsoft.com Email Verified
Phone:+73414552493
Zip:427440
Account Email Address Verified     Account Phone Number Verified     Disclaimer     Report Abuse
Sautinsoft News
Trending
Most Viewed
Daily News



Like PRLog?
9K2K1K
Click to Share