Split PDF Pages in SharePoint

In this guide you'll learn how to split a PDF file into multiple PDF files in SharePoint using PDF Converter for SharePoint.

The key features of the Muhimbi's PDF split feature are as follows:

  1. Split a single PDF file into one or more individual PDF files.
  2. Split based on the number of pages or PDF bookmarks.
  3. Can be combined in combination with other actions, e.g. convert & merge.

Note: When splitting based on bookmark levels, an extra page will always be exported for each file split based on bookmark levels. This is because PDFs store bookmarks at the page level, and so it will not be clear for the converter to identify on what part of the page a heading starts or ends.

Splitting Files Using MS SharePoint Designer Workflow

In this section we will show you how to use MS SharePoint Designer Workflow to automatically split up an existing PDF file into multiple files containing ten pages each. This is quite a common scenario for many organizations that deal with massive documents to keep the files manageable. If your document is using a format other than PDF then make sure you convert them to PDF before using this step.

The MS SharePoint Designer Workflow Activity is named Split PDF. After adding it to your workflow you will see the following Workflow Sentence.

sharepoint designer workflow

The workflow sentence is consistent with our other Workflow Activities and is largely self explanatory. The following fields are available:

  • This document: The document to split up. For most workflows selecting Current Item will suffice, but some custom scenarios may require a different item to be looked up. You may also want to check that the file type of the document is ‘pdf’ before trying to split it up.
  • This file: The name and location the split files will be written to are stored in this value. Leave this field empty to use the same folder and file name as the source file, but with sequential numbers added. However, you can optionally specify a path and / or filename template.
    • Path: Enter a path, including the Document Library and any folder names, to write the split files to. E.g. “shared documents/split files/”. You can even specify a different site collection by starting the path with a '/' (never start with 'http:'!). When just specifying a path, without the file name, then make sure to use a trailing ‘/’.
    • File Name: The file name can be anything and allows the standard .NET string formatting facilities for numbering, e.g. 'split-{0:D3}.pdf' will use 3 digits for the sequential numbers starting at ‘split-001.pdf’. When splitting by bookmark then an optional {1} parameter can be inserted in the file name to include the name of the bookmark as well.
  • Number of pages / bookmark level: Specify if you wish to split based on the number of pages or the level of the bookmark.
  • Batch size: When splitting based on the number of pages then this parameter must be set to the maximum number of pages to include in each split file. When splitting based on the bookmark level then this parameter should contain the ‘depth’ at which to split. E.g. specify ‘1’ to split on top level chapters (Chapter 1, chapter 2, etc.) or a higher number to split at a deeper level (e.g. ‘2’ splits on Chapter 1, 1.1, 1.2, 2, 2.1 etc.)
  • Output Parameter ‘List ID’: The ID of the list the split files were written to. This can later in the workflow be used to perform additional tasks on the file such as performing a check-in or out.
  • Output Parameter ‘List Item IDs’: Unlike our other workflow activities, this parameter will return a string with ‘;’ separated values of the generated item IDs. This list can then be used by other (custom) activities to process the individual files further.

The following example creates a simple example to split up PDF files in batches of 10 pages. Before you start, ensure you have the appropriate privileges to create workflows on a site collection.

  1. Create a new workflow using MS SharePoint Designer.

  2. You can associate the workflow with the library of your choice. Do not tick any of the boxes next to the ‘Automatically start....’ options, as we want to start this workflow manually. If you wish to run this workflow automatically then you may want to add an extra column to determine if a file has been split before..

  3. You can design the workflow as per the following:

    1. Check if the file is in PDF format. Otherwise it cannot be split.

    2. The ‘split’ files are written to a folder named ‘Split Files’ so make sure this folder exists. e.g. "Shared Documents/Split Files/spf-{0:D5}.pdf”. You can leave our sample file name or merge the file’s name in using workflow lookups.

    3. Log the generated list of Item IDs to the workflow history.

design workflow to split pdf

You can now publish the workflow and create / convert / upload a PDF file in the document library. From the file's context menu, select Workflows and execute your workflow. Depending on the size of the document the split files will be generated within a few seconds.

Additional Resources

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2024
This website uses cookies to ensure you get the best experience. Learn more