NCL Website header
NCL Home > Documentation > Tools

psplit

This application splits PostScript files into individual pages.

Synopsis

  psplit [-c] input_file [output_file_root] 

Description

This application takes a PostScript file, "input_file", as input and splits it into individual PostScript files having a single page each.

This application is primarily intended to be used with PostScript files that have been produced directly by NCL or PyNGL, or produced by running ctrans with a PostScript graphcap. However, "psplit" will also work on most PostScript files adhering to the PostScript Document Structuring Conventions (DSC).

By default the output files are named in sequence as "pict0001.ps", "pict0002.ps", and so forth. If you want to specify a different root name for the output files (i.e. a name different from "pict"), you can specify that by entering the optional argument "output_file_root".

In order for "psplit" to be of value, the input file will have more than a single page. As such, it is not likely that it will have a PostScript "%%BoundingBox" comment. If it does, this should indicate the limits of the aggregate of all marks on all pages in the file. If the original file does have a "%%BoundingBox" comment, then that comment will be inserted into each output file and the output files will be EPS (encapsulated PostScript) conforming provided the "%%BoundingBox" accurately bounds the marks on an output page. If the original file does not have a "%%BoundingBox" comment, then the output files will not have one. In that case, if you want the output files to be EPS conforming files, use the "ps2epsi" utility. This utility is available as part of the Ghostscript distribution and is usually installed on most Unix systems.

Options

-c
Only the number of pages in input_file is written to standard output and no output files are produced.

Examples

To split a multiple page PostScript file "input" into PostScript files having a single page each with names "pict0001", "pict0002", ...

    % psplit input

To split a multiple page PostScript file "input" into PostScript files having a single page each with names "psf0001", "psf0002", ...

    % psplit input psf

To simply determine how many pages are in a PostScript file "input".

    % psplit -c input