Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 29th, 2007, 05: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?

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

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
            .ToolButtonIsEnabled("SaveAS")
            .ToolButtonRemove("Save")
            .ToolButtonRemove("Open")
            .ToolButtonRemove("AcroForm:WidgetTool")
        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

        AcroXApp.Show()
        AcroXApp.MenuItemExecute("SaveAs")

        AcroXApp.Hide()
        'SetParent(AcroHandle, 0)
        AcroXAVDoc.Close(0)
        AcroXApp.CloseAllDocs()
        AcroXApp.Exit()


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.

  #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)
Loop
  #4 (permalink)  
Old April 13th, 2018, 07:38 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello! Try to use this one - https://www.coolutils.com/TotalMailConverterPro

The best way to convert .eml in to .pdf


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert pdf to tiff girip2p C# 4 January 31st, 2019 02:11 AM
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 08:10 AM
Convert JPG to TIFF eresina Pro VB 6 9 January 3rd, 2005 03:37 PM
i would like convert msword to pdf pmwps Classic ASP Basics 2 September 6th, 2003 11:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.