Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
Hasan_Ali@adobeforums.com #1
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
-
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... -
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... -
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... -
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... -
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... -
Leonard_Rosenthol@adobeforums.com #2
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
-
Bernd Alheit #3
Re: PDF to TIFF using VB.NBET Error:
Try this:
JSObj.saveAs(fullPathTIF, "com.adobe.Acrobat.tiff")
Bernd Alheit Guest
-
Hasan_Ali@adobeforums.com #4
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
-
Bernd Alheit #5
Re: PDF to TIFF using VB.NBET Error:
In Acrobat 9 you must use "com.adobe.acrobat.tiff" for parameter cConvID.
Bernd Alheit Guest
-
Hasan_Ali@adobeforums.com #6
Re: PDF to TIFF using VB.NBET Error:
Thanks a lot Bernd. That works.
Hasan_Ali@adobeforums.com Guest
-
Hasan_Ali@adobeforums.com #7
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
-
Bernd Alheit #8
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
-
Hasan_Ali@adobeforums.com #9
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
-
PDL@adobeforums.com #10
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
-
Dinesh #11
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



Reply With Quote

