PDF to TIFF using VB.NBET Error:

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default PDF to TIFF using VB.NBET Error:

    I'm trying to use the following VB function to transform a pdf
    document to a tiff one:
    I am using Visual Studio 2008, VB.Net
    Using the following code, But when I type
    'JSObj.SaveAs(fullPathTIF, "com.adobe.acrobat.tiff")'
    Visual studio intelisence doesn't show the SaveAs method at all. I went ahead and typed it, but got the following error in that line
    Error: UnsupportedValueError: Value is unsupported. ===> Parameter cConvID
    I tried googling forvthat error, but could not find a solution. Please help.
    I am trying to do a proof of concept to my client saying that Adobe acrobat could help them convert PDF to TIFF and Tiff to PDF and they are ready to buy the product if I prove that in the .Net environment.
    CODE:
    =====
    <http://forums.microsoft.com/msdn/showpost.aspx?postid=1665127&siteid=1&sb=0&d=1&at= 7&ft=11&tf=0&pageid=1>

    Private Sub savePDFtoTIF(ByVal fullPathPDF As String, ByVal
    fullPathTIF As String)
    Dim PDFApp As Acrobat.AcroApp
    Dim PDDoc As Acrobat.CAcroPDDoc
    Dim AVDoc As Acrobat.CAcroAVDoc
    Dim JSObj As Object

    ' Create Acrobat Application object
    PDFApp = CreateObject("AcroExch.App")

    ' Create Acrobat Document object
    PDDoc = CreateObject("AcroExch.PDDoc")

    ' Open PDF file
    PDDoc.Open(fullPathPDF)

    ' Create AV doc from PDDoc object
    AVDoc = PDDoc.OpenAVDoc("TempPDF")

    ' Hide Acrobat application so everything is done in silent
    mode
    PDFApp.Hide()

    ' Create Javascript bridge object
    JSObj = PDDoc.GetJSObject()

    ' Attempt to save PDF to TIF image file.
    ' SaveAs method syntax .SaveAs( strFilePath, cConvID )
    ' For TIFF output the correct cConvid is
    ' cCovid MUST BE ALL LOWERCASE.
    JSObj.SaveAs(fullPathTIF, "com.adobe.acrobat.tiff")

    PDDoc.Close()
    PDFApp.CloseAllDocs()

    ' Clean up
    System.Runtime.InteropServices.Marshal.ReleaseComO bject(JSObj)
    JSObj = Nothing

    System.Runtime.InteropServices.Marshal.ReleaseComO bject(PDFApp)
    PDFApp = Nothing

    System.Runtime.InteropServices.Marshal.ReleaseComO bject(PDDoc)
    PDDoc = Nothing

    System.Runtime.InteropServices.Marshal.ReleaseComO bject(AVDoc)
    AVDoc = Nothing

    End Sub
    Hasan_Ali@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. Photoshop TIFF Parsing Error
      When scanning a large format 4x150 ft cadd drawing and saving it as a .tif, when trying to open it in Photoshop we receive a .tif parsing error. It...
    2. PDF to TIFF conversion error
      I have a one page PDF 1.4 file with Japanese fonts and I received the following error when I tried to save it as a TIFF: "Insufficient permissions...
    3. LZW Tiff error fro CS pshop to PC
      I cannot get a tiff file with LZW compression to import into any word or powerpoint Office application on a PC from Photoshop CS. However if I do the...
    4. OSX quicktime and TIFF error
      (sorry I didn't reply to the original message, but Google Groups won't let me reply to this message for some reason, and I don't have another news...
    5. TIFF file error - cannot open scanned doc
      Error message: "Could not open . . . because TIFF file uses an unsupported space", when scanning photos from an HP9100 digital sender, having...
  3. #2

    Default Re: PDF to TIFF using VB.NBET Error:

    lowercase 's' in saveAs().

    Please read the documentation in the Acrobat SDK...
    Leonard_Rosenthol@adobeforums.com Guest

  4. #3

    Default Re: PDF to TIFF using VB.NBET Error:

    Try this:

    JSObj.saveAs(fullPathTIF, "com.adobe.Acrobat.tiff")
    Bernd Alheit Guest

  5. #4

    Default Re: PDF to TIFF using VB.NBET Error:

    Hi I tried with the lowercase 's' in saveAs(),
    I am still getting the same error
    'UnsupportedValueError: Value is unsupported. ===> Parameter cConvID.'
    Wierd thing is I am not getting the 'saveAs()' method as an option for the JSObj at all I am just forcibily typing it. May be, do you guys think I am missing any reference. I have a project reference for the Acrobat 9 com component (Component Name: Acrobat Typelib version 1.0, C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.tlb
    Please help.
    My exact code is:
    Dim JSObj As Object, strPDFText As String
    ' Create Acrobat Application object
    PDFApp = CreateObject("AcroExch.App")
    ' Create Acrobat Document object
    PDDoc = CreateObject("AcroExch.PDDoc")
    ' Open PDF file
    PDDoc.Open("D:\Applications\Test_winapp\PDFUtility \WindowsApplication1\WindowsApplication1\sample.pd f") ' Path of some PDF you want to open
    ' Hide Acrobat application so everything is done in silent mode
    PDFApp.Hide()
    ' Create Javascript bridge object
    JSObj = PDDoc.GetJSObject()
    ' Create Tiff file
    JSObj.saveAs("D:/Applications/sample.tiff", "com.adobe.Acrobat.tiff")
    PDDoc.Close()
    PDFApp.CloseAllDocs()
    ' Clean up
    System.Runtime.InteropServices.Marshal.ReleaseComO bject(JSObj)
    JSObj = Nothing
    System.Runtime.InteropServices.Marshal.ReleaseComO bject(PDFApp)
    PDFApp = Nothing
    System.Runtime.InteropServices.Marshal.ReleaseComO bject(PDDoc)
    PDDoc = Nothing
    Hasan_Ali@adobeforums.com Guest

  6. #5

    Default Re: PDF to TIFF using VB.NBET Error:

    In Acrobat 9 you must use "com.adobe.acrobat.tiff" for parameter cConvID.
    Bernd Alheit Guest

  7. #6

    Default Re: PDF to TIFF using VB.NBET Error:

    Thanks a lot Bernd. That works.
    Hasan_Ali@adobeforums.com Guest

  8. #7

    Default Re: PDF to TIFF using VB.NBET Error:

    Is there a way to create a single Tiff file to hold multiple pages from the multi paged PDF. Current solution creates multiple tiff files for one pdf that has more than one page.
    Hasan_Ali@adobeforums.com Guest

  9. #8

    Default Re: PDF to TIFF using VB.NBET Error:

    Look for a third-party tool for converting the tiff files into a multi-page tiff file.
    Bernd Alheit Guest

  10. #9

    Default Re: PDF to TIFF using VB.NBET Error:

    Ok. Does Acrobat support Tiff to PDF conversion.If so please let me know the COM reference I should use.
    Hasan_Ali@adobeforums.com Guest

  11. #10

    Default Re: PDF to TIFF using VB.NBET Error:

    There is a sample project to do this that comes with the SDK, called AdobePDFSilentVB.
    PDL@adobeforums.com Guest

  12. #11

    Default Re: PDF to HTML not any error not converting

    i am using same as above code but output not coming at all. please help
    Dinesh Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139