2

The cfpdf tag has lots of options but I can't seem to find one for splitting apart a PDF package into separate files which can be saved to the file system.

Is this possible?

Adam Tuttle
  • 19,505
  • 17
  • 80
  • 113
Chris Brandt
  • 948
  • 3
  • 11
  • 22

1 Answers1

3

There's not a direct command, but you can achieve what you want to do in very few lines of code by using action="merge", with the "pages" attribute. So if you wanted to take a 20-page PDF and create 20 separate files, you could use getInfo to get the number of pages in the input document, then loop from 1 to that number, and in that loop, do a merge from your input document to a new output document for each iteration, with pages="#currentPage#" (or whatever your loop counter is)

marc esher
  • 4,871
  • 3
  • 36
  • 51