Search
Close this search box.

Split PDF by page

Splits the PDF file using any of 4 different splitting options: Split into single pages, Split by page range, Split by repeating range, Split by top level bookmarks.

Input Parameters

Required Parameters

File Content:
Data Type = string (byte – base 64 string)
The content of the source file, this should be converted to a base64 string if you are passing it from code, otherwise Power Automate handles this aspect.

Output File Name:
Data Type = string
The naming template for the output file name. Any occurrence of variables in the list below will be replaced by the appropriate value at runtime.

  • %FILENAME or %F%:The original file name without the .pdf extension.
  • %UNIQUE or %U%:A unique identifier based on the start page number of the split file.
  • %UNIQUE2, …, %UNIQUEn:A unique identifier based on the start page number of the split file. This identifier is restricted to ‘n’ significant figures (up to n = 6), and will add leading 0’s if needed.
  • %TIMESTAMP:The current Time.
  • %DATESTAMP:The current Date.
  • %GUID:Generates a random string of numbers as a Globally Unique Identifier.
  • %BOOKMARK:For use with ‘Split by top level bookmark’. The name of bookmark section of the split file.


File Name:
Data Type = string
The name of the source file.

Split Type:
Data Type = string
The split operation to be carried out on each file

  • Split into single pages – gives a single page output for every page
  • Split by page range – splits the document at the given page range
  • Split by repeating range – splits the document at the given page range, repeating this split at each increment of ‘repeat Every’
  • Split by top level bookmarks – splits at each top level bookmark found in the document

Optional Parameters

Page Range:
Data Type = string
Set of page ranges separated by commas that define which pages from the original should be extracted. The following types of page ranges are allowed:

  • 1 – Specifies a single page
  • 1-10 – Specifies a range of pages
  • 1-lastpage – Specifies a range of pages, between 1 and the last page of the document
  • 1-10odd – Specifies a range of pages, but only odd numbered pages will appear in the output
  • 1-10even – Specifies a range of pages, but only even numbered pages will appear in the output


Repeat Every (Pages):
Data Type = int
Apply the Page Range to each set of page ranges within the document. For example, if 2-4 is specified for page ranges, and 4 is specified as the repeating range (Repeat Every), then the range is re-applied every 4 pages. Hence the file is split such that the first output file contains pages 2-4 from the original document; the second contains pages 6-8 and so on. Only work with a page range (1-3) and not single pages (1) or sets of ranges (1-3, 1).

Retain Bookmarks:
Data Type = boolean
Generated files will include bookmarks from the original file.

Retain Metadata:
Data Type = boolean
Generated files will include metadata (such as Author and Title) from the original file.

Output Parameters

Split Output Files:
Data Type = object[]
Array of Split Files with their corresponding file names.

File Content:
Data Type = string (byte – base 64 string)
A base 64 string representation of the spilt file.

File Name:
Data Type = string
File name for the split file above, without the file extension.

Page Range:
Data Type = string
The page range containing the page numbers of the split operation.

Is Successful:
Data Type = boolean
A boolean value specifying if the operation was successful or not.

License Info:
Data Type = string
Information about your API subscription key, it contains:

LicenseType
CallsRemaining
CallsMade
RenewalDate

Error:
Data Type = string
Contains the Error message returned by the operation if any exist.