Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old January 29th, 2007, 04:27 PM
Authorized User
Join Date: Mar 2006
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert PDF to Tiff in code

Is there a way to convert a PDF to a Multipage Tiff in VB code.
Can it be done using an Acrobat reference(COM). I know you can save as Tiff in Acrobat. Could I just do shell calls to save As?

Reply With Quote
  #2 (permalink)  
Old January 30th, 2007, 03:16 PM
Authorized User
Join Date: Mar 2006
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts

I have cobbled together this code so far:

 Dim FileName As String
        Dim image As String = "Image"

        AcroXApp = CType(CreateObject("AcroExch.App"), Acrobat.CAcroApp)
        'Removing toolbar buttons from the user interface
        With AcroXApp
        End With
        AcroXAVDoc = CType(CreateObject("AcroExch.AVDoc"), Acrobat.CAcroAVDoc)
        FileName = "C:\Image.pdf"
        AcroXAVDoc.Open(FileName, "Acrobat")

        AcroXPDDoc = CType(AcroXAVDoc.GetPDDoc, Acrobat.CAcroPDDoc)
        AcroXPDDoc.ClearFlags(&H1) 'Keep Acrobat from querying a file save when component closes


        'SetParent(AcroHandle, 0)

I can open the SaveAs Dialogue, but How can I populate it with the filename I want("Image.tiff"). And then I wuld like to have this done without showing the Acrobat screens.

Reply With Quote
  #3 (permalink)  
Old August 5th, 2017, 04:59 AM
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)
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert pdf to tiff girip2p C# 3 December 18th, 2013 09:58 PM
Convert PDF to JPG harpua PHP How-To 1 September 17th, 2007 06:04 AM
Need to Convert ASP to PDF metrov Classic ASP Databases 2 March 9th, 2007 07:10 AM
Convert JPG to TIFF eresina Pro VB 6 9 January 3rd, 2005 02:37 PM
i would like convert msword to pdf pmwps Classic ASP Basics 2 September 6th, 2003 11:41 PM

All times are GMT -4. The time now is 04:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.