Skip to main content
Participant
June 21, 2022
Question

Split and combine pdf using API

  • June 21, 2022
  • 3 replies
  • 674 views

I have a PDF that needs to be split in to 3 PDF's, Read PDF and determine the page to split ex 1-3 as F1, 4-6 as F2, 7-10 as F3

Once known split the PDF in to 10 pages and then combine 1-3 in to a file, 4-6 in to a file and 7-10 in to a file?

Does Acrobat provides any built in APIs ? if yes how can I access it ?

Appreicate your help in Advance.

This topic has been closed for replies.

3 replies

Bernd Alheit
Community Expert
Community Expert
June 22, 2022

Try the forum for Adobe Acrobat.

Legend
June 21, 2022

But, to be clear, Acrobat Reader does NOT offer any such API. Noting this because you posted in the Acrobat Reader forum.

Participant
June 22, 2022

Could you please guide which will be the correct forum or group to raise such a case ?

Legend
June 22, 2022

You do not "raise a case" by using these forums. You talk to a community of Adobe customers who might share their experience and expertise. Or nothing. There is no case to follow up, and no requirement to answer. As suggested, if you want to do this with an Adobe product, you need to pay for Acrobat, not use the free Acrobat Reader; be sure you know the difference.  (You can raise a case with Adobe, but they cannot help programmers write code).

 

When the reply says "a script can do that" the meaning is you (as a script programmer) can write a script to do this. The place to start is the Acrobat SDK, with thousands of pages of detailed information for script writers and programmers.  https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/index.html

try67
Community Expert
Community Expert
June 21, 2022

A script in Acrobat can do that, yes.

Participant
June 22, 2022

Can you please provide more details ? Where I can find this script ? 

 

try67
Community Expert
Community Expert
June 22, 2022

You can't find it. You need to write it, or have someone write it for you.

If the number of pages in the file will always be divisible by 3 then you can use this script to do it:

 

 

for (var p=0; p<this.numPages; p+=3) {
	this.extractPages(p, p+2, this.path.replace(this.documentFileName, "F"+((p/3)+1)+".pdf"));
}

 

 

 

You can run it from the JS Console or via a Custom Command, for example.