Output Driver Configuration

PSPP can write output in several formats. This section documents the supported formats and how they can be configured.

Text Output (.txt and .text)

PSPP can produce plain text output, drawing boxes using ASCII or Unicode line drawing characters.

Plain text output is encoded in UTF-8.

This driver has the following options:

  • width: <columns>
    Sets the maximum page width to the specified number of columns. To fit in the given width, output tables columns will be word-wrapped or, if necessary, tables will be broken into multiple chunks. The default is no maximum width.

  • boxes: unicode
    boxes: ascii
    Sets the style used for boxes in the output. The following shows an example of each style:

      unicode       ascii
    ┌────┬────┐  +----+----+
    │    │    │  |    |    |
    ├────┼────┤  +----+----+
    │    │    │  |    |    |
    └────┴────┘  +----+----+
    

    Unicode boxes are generally more attractive but they can be harder to work with in some environments. The default is unicode.

  • emphasis: <bool>
    If this is set to true, then the output includes bold and underline emphasis with overstriking. This is supported by only some software, mainly on Unix. The default is false.

PDF Output (.pdf)

This driver has the following options:

  • page_setup: <PageSetup>
    Sets the page size, margins, and other parameters. The following sub-options are available:

    • initial_page_number: <number>
      The page number to use for the first page of output. The default is 1.

    • paper: <size>
      Sets the page size. <size> is a quoted string in the form <w>x<h><unit>, e.g. 8.5x11in or 210x297mm, or the name of a standard paper size, such as letter or a4. The default is system- and user-dependent.

    • margins: <trbl>
      margins: [<tb>, <lr>]
      margins: [<t>, <rl>, <b>]
      margins: [<t>, <r>, <b>, <l>]
      Sets the margins. Each variable is a quoted string with a length and a unit, e.g. 10mm. The one-value form sets all margins to the same length; the two-value form sets the top and bottom margins separately from left and right; and so on. The default is 0.5in.

    • orientation: portrait
      orientation: landscape
      Controls the output page orientation. The default is portrait.

    • object_spacing: <length>
      Sets the vertical spacing between output objects, such as tables or text. <length> is a quoted string with a length and a unit, e.g. 10mm. The default is 12pt, or 1/6 of an inch.

    • chart_spacing: as_is
      chart_spacing: full_height
      chart_spacing: half_height
      chart_spacing: quarter_height
      Sets the size of charts and graphs in the output. The default, as_is, uses the size specified in the charts themselves. The other possibilities set chart size in terms of the height of the page.

    • header: <heading>
      footer: <heading>

HTML Output (.htm and .html)

Comma-Separated Value Output (.csv)

JSON Output (.json)

SPSS Viewer Output (.spv)