Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting Pages of a PDF using VB

Status
Not open for further replies.

aberry

MIS
Jun 6, 2002
24
0
0
Hi,

I am trying to programatically extract pages from a large PDF and break it down into smaller PDF's.

I am experiencing some problems however. The jso.extractpages option seems to be erroring. Can anyone point me to where I am going wrong. Code follows.

Thanks,

Andrew

Dim jso As Object
Dim gPDDoc As Acrobat.CAcroPDDoc
Dim gApp As Acrobat.CAcroApp

Set gApp = CreateObject("AcroExch.App")
Set gPDDoc = CreateObject("AcroExch.PDDoc")

gPDDoc.Open "C:\test.pdf"
Set jso = gPDDoc.GetJSObject

lRet = jso.extractpages(lPageCounter, iPages, "C:\" & lDocCount & ".pdf")

lPageCounter keeps track of the number of pages I have already extracted and iPages signifies the number of pages I wish to extract.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top