Skip to content
HTKapp
Browse the documentation

Split module: dividing a PDF into several files

The Split module breaks the current document into several independent PDF files, according to the method you choose. Unlike the classic editing modules, this operation does not alter the open document: it exports new PDF files directly into a destination folder of your choice. The module is available from the Organization category of the Dashboard.

Available split methods

Three methods are offered in the Split method section:

Every page

Each page of the document becomes a separate PDF file. Ideal for breaking up an assembly of several documents bound into a single PDF (for example a batch mailing of invoices).

Custom interval

The document is segmented into files containing a fixed number of pages. A Pages per file field appears: enter an integer ≥ 1.

  • The value entered may use a comma or a full stop as a separator; HtkPDF only uses the integer part.
  • If the value is not a positive integer, a "Please enter a positive whole number" message is shown and the confirmation button is disabled.
  • The last segment may contain fewer pages than the requested size if the total does not divide exactly.

By bookmarks (chapters)

The document is cut using its table of contents: each top-level entry of the PDF outline produces an independent file covering the pages from that entry up to the next one.

  • This option is only available if the document actually contains an outline. Otherwise a "This document contains no bookmarks" message appears and the Split button stays disabled.
  • The name of each generated file reuses the title of the matching bookmark — accented letters included —, with characters that are invalid in a file name replaced by an underscore. The pages before the first bookmark go into a “Front matter” file.
  • Every file, whatever the splitting method, carries the document metadata and the part of the outline that concerns its pages: a chapter leaves with its sections.

The Summary block

The Summary section recaps in real time the effect of the chosen method:

  • Total pages: number of pages in the current document;
  • Files generated: estimated number of files produced. This indicator is empty when the parameters are invalid (a badly filled Interval field, for example).

For the Every page and Interval modes, an additional sentence gives the maximum size of each segment ("The document will be split into X file(s) of at most Y page(s)").

Running the split

Click the Split button at the bottom of the panel. An "Export operation" dialog reminds you that:

This action will export the split files directly into the folder of your choice. The current document will stay open and unchanged.

Confirm with I understand to open a macOS folder picker. The folder proposed by default is the one configured in Settings > Files > Default folder.

Once confirmed, HtkPDF writes the files into the chosen folder using the following naming convention:

  • in Every page or Custom interval mode: <original_name>_part_001.pdf, <original_name>_part_002.pdf, and so on;
  • in By bookmarks mode: <original_name>_<bookmark_title>.pdf.

While writing, the button reads "Splitting…" and stays disabled to prevent a double click. If one or more files cannot be written (permissions, insufficient disk space), an error message is shown afterwards, stating the number of failed segments.

Returning to the Dashboard

Once the split has finished successfully, the module closes automatically and the Dashboard is shown again. The current document has undergone no change: there is therefore nothing to save.

Note: if the document contains internal links pointing between chapters, those may become invalid in the files produced by the split (the target may end up in another file). Likewise, the global table of contents is kept in each segment, but its entries may point outside the file. For splits intended for independent sending, consider regenerating each segment's outline afterwards through the Outline module.

Screenshots

1 screenshot — click to enlarge