View Single Post
  #3 (permalink)  
Old August 5th, 2017, 04:59 AM
Dannili Dannili is offline
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2017
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert PDF to Tiff in vb.net code

I recommend you use xspdf control http://www.xspdf.com/guide/pdf-tiff-converting/
here is the vb.net code to convert pdf to tiff image

Dim pdfConverter As PdfImageConverter = New PdfImageConverter("sample.pdf")
' Set the dpi, the output image will be rendered in such resolution
pdfConverter.DPI = 96
Dim i As Integer = 0
Do While (i < pdfConverter.PageCount)
' Convert each pdf page to a single page tiff image with original page size
'Image pageImage = pdfConverter.PageToImage(i);
' Convert pdf to single page tif in customized image size
Dim pageImage As Image = pdfConverter.PageToImage(i, 500, 800)
' Save converted image to tiff format
pageImage.Save(("Page " _
+ (i + ".tiff")), ImageFormat.Tiff)
i = (i + 1)
Loop
Reply With Quote