Search manual:

- Main page
- Introduction
- Hello, world!
- Basics
  - How to write the layout
  - Structure of the data file and the layout rules
  - Outputting objects
  - Grid
  - Areas on the page (PositioningArea)
  - File organization
  - Hyphenation / language settings
  - Using fonts
  - Text formats
  - Text formatting
  - Colors
- Programming
- Image inclusion
- Tables
- Advanced topics
  - Bookmarks
  - Creation of XML structures
  - Print output / crop marks
  - Using CSS with the speedata Publisher
  - Groups (virtual objects)
  - Virtual pages
  - Rotation of contents
  - Sorting data
  - Wrap around images
  - Page types
  - Starting the Publisher via the Hotfolder
  - Lua-Filter / pre-processing
  - Schema validation
  - Quality assurance and PDF comparison
  - Troubleshooting / Debugging
  - Server mode (REST API)
  - Control of the layout when calling the Publisher
  - Create and use images with MetaPost
- Cookbook
  - Thumb index
  - Embed multipage PDF files
  - Layout optimization using groups
  - Imitate bulleted lists
  - Automatically generated directories
  - Create table of contents in one go
  - Page numbers: Page x of y
- Installation instructions
- File name in the Publisher
- speedata Publisher defaults
- Running the speedata publisher on the command line
- How to configure the speedata publisher
- Lenghts and units
- XPath- and Layoutfunctions
- Internal variables
- Associate XML editor with schema
  - Visual Studio Code
  - OxygenXML
- Changelog
- Glossary
- Compatibility with other software
- Command reference
  - Attribute index
  - A
  - Action
  - AddSearchpath
  - AtPageCreation
  - AtPageShipout
  - AttachFile
  - Attribute
  - B
  - Barcode
  - Bold
  - BoldItalic
  - Bookmark
  - Box
  - Br
  - Case
  - Circle
  - ClearPage
  - Clip
  - Color
  - Column
  - Columns
  - Compatibility
  - Contents
  - Copy-of
  - DefineColor
  - DefineColorprofile
  - DefineFontalias
  - DefineFontfamily
  - DefineGraphic
  - DefineMatter
  - DefineTextformat
  - Element
  - Fallback
  - Fontface
  - ForAll
  - Frame
  - Grid
  - Group
  - Groupcontents
  - HSpace
  - Hyphenation
  - I
  - Image
  - Include
  - Initial
  - InsertPages
  - Italic
  - Layout
  - Li
  - LoadDataset
  - LoadFontfile
  - Loop
  - Makeindex
  - Margin
  - Mark
  - Message
  - NewPage
  - NextFrame
  - NextRow
  - NoBreak
  - Ol
  - Options
  - Otherwise
  - Output
  - Overlay
  - Pageformat
  - Pagetype
  - Paragraph
  - PDFOptions
  - PlaceObject
  - Position
  - PositioningArea
  - PositioningFrame
  - ProcessNode
  - Record
  - Regular
  - Rule
  - SaveDataset
  - SavePages
  - SetGrid
  - SetVariable
  - SortSequence
  - Stylesheet
  - Span
  - Sub
  - Sup
  - Switch
  - Table
  - TableNewPage
  - Tablefoot
  - Tablehead
  - Tablerule
  - Td
  - Text
  - Textblock
  - Tr
  - Trace
  - Transformation
  - U
  - Ul
  - Until
  - URL
  - Value
  - VSpace
  - While

Version 4.12.1
Search manual

- Main page
- Introduction
- Hello, world!
- Basics
  - How to write the layout
  - Structure of the data file and the layout rules
  - Outputting objects
  - Grid
  - Areas on the page (PositioningArea)
  - File organization
  - Hyphenation / language settings
  - Using fonts
  - Text formats
  - Text formatting
  - Colors
- Programming
- Image inclusion
- Tables
- Advanced topics
  - Bookmarks
  - Creation of XML structures
  - Print output / crop marks
  - Using CSS with the speedata Publisher
  - Groups (virtual objects)
  - Virtual pages
  - Rotation of contents
  - Sorting data
  - Wrap around images
  - Page types
  - Starting the Publisher via the Hotfolder
  - Lua-Filter / pre-processing
  - Schema validation
  - Quality assurance and PDF comparison
  - Troubleshooting / Debugging
  - Server mode (REST API)
  - Control of the layout when calling the Publisher
  - Create and use images with MetaPost
- Cookbook
  - Thumb index
  - Embed multipage PDF files
  - Layout optimization using groups
  - Imitate bulleted lists
  - Automatically generated directories
  - Create table of contents in one go
  - Page numbers: Page x of y
- Installation instructions
- File name in the Publisher
- speedata Publisher defaults
- Running the speedata publisher on the command line
- How to configure the speedata publisher
- Lenghts and units
- XPath- and Layoutfunctions
- Internal variables
- Associate XML editor with schema
  - Visual Studio Code
  - OxygenXML
- Changelog
- Glossary
- Compatibility with other software
- Command reference
  - Attribute index
  - A
  - Action
  - AddSearchpath
  - AtPageCreation
  - AtPageShipout
  - AttachFile
  - Attribute
  - B
  - Barcode
  - Bold
  - BoldItalic
  - Bookmark
  - Box
  - Br
  - Case
  - Circle
  - ClearPage
  - Clip
  - Color
  - Column
  - Columns
  - Compatibility
  - Contents
  - Copy-of
  - DefineColor
  - DefineColorprofile
  - DefineFontalias
  - DefineFontfamily
  - DefineGraphic
  - DefineMatter
  - DefineTextformat
  - Element
  - Fallback
  - Fontface
  - ForAll
  - Frame
  - Grid
  - Group
  - Groupcontents
  - HSpace
  - Hyphenation
  - I
  - Image
  - Include
  - Initial
  - InsertPages
  - Italic
  - Layout
  - Li
  - LoadDataset
  - LoadFontfile
  - Loop
  - Makeindex
  - Margin
  - Mark
  - Message
  - NewPage
  - NextFrame
  - NextRow
  - NoBreak
  - Ol
  - Options
  - Otherwise
  - Output
  - Overlay
  - Pageformat
  - Pagetype
  - Paragraph
  - PDFOptions
  - PlaceObject
  - Position
  - PositioningArea
  - PositioningFrame
  - ProcessNode
  - Record
  - Regular
  - Rule
  - SaveDataset
  - SavePages
  - SetGrid
  - SetVariable
  - SortSequence
  - Stylesheet
  - Span
  - Sub
  - Sup
  - Switch
  - Table
  - TableNewPage
  - Tablefoot
  - Tablehead
  - Tablerule
  - Td
  - Text
  - Textblock
  - Tr
  - Trace
  - Transformation
  - U
  - Ul
  - Until
  - URL
  - Value
  - VSpace
  - While

- Dieses Handbuch auf Deutsch

# Running the speedata publisher on the command line

The speedata Publisher is started via the command line (also: terminal, command window). On the one hand there are commands, on the other hand the commands can be controlled via parameters.

    $ sp <Command> <Parameter> <Parameter> ...

| On Windows/PowerShell you have to run `sp.exe` since `sp` is an internal command of PowerShell.

The default command is `run`. So the call of

    $ sp

the same as

    $ sp run

Besides the command `run` there are other commands (see below).

With

    $ sp --help

you can display a list of the allowed commands and parameters.

## Description of the commands

`clean`

  Deletes all generated intermediate files and keeps the PDF file.

`clearcache`

  Removes files from the image cache.

`compare`

  Recursively check a directory for layout changes. See the topic about quality assurance.

`doc`

  Opens the reference manual in the browser (local HTML files).

`list-fonts`

  Lists all font files found in the Publisher directories. Together with `--xml` this command allows to copy&paste the output into the layout rules. See Using fonts.

`new [DIRECTORY]`

  Create simple layout and data file to start. Provide optional directory.

`run`

  Start publishing (default).

`server`

  Run as http-api server on localhost port 5266 (configure with `--address` and `--port`). See the chapter Server mode (REST API).

`watch`

  Start watchdog / hotfolder. See Starting the Publisher via the Hotfolder.

## Description of the commandline parameters

`-h`, `--help`

  Show this help

`--address=IPADDRESS`

  Address to be used for the server mode. Defaults to 127.0.0.1.

`--autoopen`

  Open the PDF file. Can be set in the How to configure the speedata publisher.

`--cache=METHOD`

  Use cache method. One of `none`, `fast` or `optimal`. Default is `optimal`.

`-c`, `--config=NAME`

  Read the config file with the given NAME. Default: `publisher.cfg`

`--credits`

  Show credits and exit

`--[no-]cutmarks`

  Display cutmarks in the document

`--data=NAME`

  Name of the XML data file. Defaults to `data.xml`. Use `-` for STDIN (only 1 run possible).

`--dummy`

  Don’t read a data file, use `<data />` as input

`-x`, `--extra-dir=DIR`

  Additional directory for file search.

`--extra-xml=NAME`

  Add this file to the layout file

`--filter=FILTER`

  Run Lua filter before publishing starts

`--grid`

  Display background grid. Disable with `--no-grid`

`--ignore-case`

  Ignore case when accessing files (on a case-insensitive file system)

`--imagecache=PATH`

  Set the image cache

`--inkscape=PATH`

  Set the path to the inkscape program

`--jobname=NAME`

  The name of the resulting PDF file (without extension), default is `publisher`

`--[no-]local`

  Add local directory to the search path. Default is true

`--layout=NAME`

  Name of the layout file. Defaults to `layout.xml`

`--logfile=NAME`

  Logfile for server mode. Default `publisher.protocol`. Use STDOUT for standard output and STDERR for standard error.

`--mainlanguage=NAME`

  The document’s main language in locale format, for example `en` or `en_US`.

`--mode=NAME`

  Set mode. Multiple modes given in a comma separated list. See Control of the layout when calling the Publisher.

`--option=OPTION`

  Set a specific option that has no command line parameter.

`--outputdir=DIR`

  Copy PDF and protocol to this directory.

`--pdfversion=VERSION`

  Set the PDF version. Default is 1.6.

`--prepend-xml=NAME`

  Add this file in front of the layout file

`--port=PORT`

  Port to be used for the server mode. Defaults to 5266

`--quiet`

  Run publisher in silent mode

`--runs=NUM`

  Number of publishing runs

`--startpage=NUM`

  The first page number

`--show-gridallocation`

  Show the allocated grid cells

`-s`, `--suppressinfo`

  Suppress optional information (timestamp) and use a fixed document ID

`--systemfonts`

  Use system fonts (not Win XP)

`--tempdir=DIR`

  Use this directory instead of the system temporary directory

`--trace`

  Show debug messages and some tracing PDF output

`--timeout=SEC`

  Exit after SEC seconds

`-v`, `--var=VAR=VALUE`

  Set a variable for the publishing run

`--varsfile=NAME`

  Set variables for the publishing run from a file with each line containing `key=value` pairs

`--verbose`

  Print a bit of debugging output

`--version`

  Show version information

`--wd=DIR`

  Change working directory

`--xml`

  Output as (pseudo-)XML (for list-fonts)

- speedata Publisher defaults
- How to configure the speedata publisher