Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
Nitesh.Patel@adobeforums.com #1
How to extract images from PDF file through VB.Net
I am developing a desktop application in VB.Net. I need to extract images from the PDF file. I am using Adobe Acrobat 7.0.5 SDK. I have written following code, however, it is throwing an error when I execute PDFJS.dataObjects.
Dim PDFApp As Acrobat.CAcroApp
Dim PDFAVDoc As Acrobat.CAcroAVDoc
Dim PDFFilePath As String
Dim PDFDoc As Acrobat.CAcroPDDoc
Dim PDFJS As Object
Dim Obj As Object
Dim objs() As Object
Dim NoOfPages As Integer
Dim i As Integer
PDFFilePath = Application.StartupPath & "\Sample.pdf"
Try
PDFApp = CreateObject("AcroExch.App")
PDFApp.Show()
PDFAVDoc = CreateObject("AcroExch.AVDoc")
PDFAVDoc.Open(PDFFilePath, "Test Application")
PDFDoc = PDFAVDoc.GetPDDoc
PDFJS = PDFDoc.GetJSObject
NoOfPages = PDFJS.numPages
objs = PDFJS.dataObjects
'This statement throwing an error – Public
'member 'dataObjects' on type '_ComObject' not found.
If Not objs Is Nothing Then
For i = 0 To objs.Length - 1
Obj = PDFJS.getDataObject(objs(i).name)
If Obj Is Nothing Then
If TypeOf (Obj) Is Bitmap Then
'If type if obj is bitMap then Save this
'object as .jpeg, .tiff, etc.
End If
End If
Next
End If
PDFAVDoc.Close(0)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
If Not PDFApp Is Nothing Then
PDFApp.CloseAllDocs()
PDFApp.Exit()
End If
End Try
I am developing this application on Windows XP Professional edition.
Is there any other way to extract images from PDF file?
Thanks,
Nitesh
Nitesh.Patel@adobeforums.com Guest
-
Extract all images from pdf files?
I need to extract all images(vector and raster) from pdf files through programmatically. Kindly advice me. -
How to extract Metadata of PDF File using DLE APIs
May i get some information for how to extract metadata of PDF File using DLE API if possible, may i get some sample code.... -
Extract separate pages of a pdf file
Is there any way that I can "automatically" separate a 60 page pdf file into 60 separate pdf files? This is a function that I will use a lot. If... -
extract zip file in php
Hi, I have to extract a zip file into a web server in php. I found ZZIPlib LIbrary by Guido Draheim which allow to do this but I can't install... -
actions - extract file name
You could run contact sheet at the end of your action, you would ahve to select the folder the images are in and then set the image size and it will... -
Aandi_Inston@adobeforums.com #2
Re: How to extract images from PDF file through VB.Net
Are you assuming that "dataobjects" corresponds to the objects on the
page? It doesn't. There is no JavaScript or IAC method that gives you
access to page contents in this way.
Aandi Inston
Aandi_Inston@adobeforums.com Guest
-
Nitesh.Patel@adobeforums.com #3
Re: How to extract images from PDF file through VB.Net
Is there any other way to get objects on the page?
Nitesh.Patel@adobeforums.com Guest
-
Aandi_Inston@adobeforums.com #4
Re: How to extract images from PDF file through VB.Net
Only through the plug-in API. Plug-ins are written in Visual C++, with
C or C++, and are not separate applications.
Aandi Inston
Aandi_Inston@adobeforums.com Guest
-
Aandi_Inston@adobeforums.com #5
Re: How to extract images from PDF file through VB.Net
By the way, I'd very strongly recommend reading the PDF Reference
before considering any kind of extraction. So you know what is in
there.
Aandi Inston
Aandi_Inston@adobeforums.com Guest



Reply With Quote

