Next: lepton-cli config, Up: lepton-cli - Lepton command-line utility [Contents][Index]

### 7.1 lepton-cli export

The command `lepton-cli export` is used to export schematic and symbol files in a variety of image formats. The resulting images can be then used for printing or embedding into other documents. It currently supports single-page PNG, SVG and EPS output, and multi-page PS and PDF output. It accepts a variety of options for controlling how the output is formatted.

> Note: `lepton-cli export` can produce multi-page PDF and PS documents in one go.

Usage:

    lepton-cli export [OPTION ...] -o OUTPUT [--] FILE ...

The command can be used with the options described below.

`-o FILE`
`--output=FILE`

  Output generated image data to FILE.

`-f FORMAT`
`--format=FORMAT`

  Specify an output format. FORMAT can be one of ‘`png`’, ‘`pdf`’, ‘`svg`’, ‘`ps`’, or ‘`eps`’. Usually, this option is not required, because `lepton-cli` will infer the correct format from the file extension of the output file.

`-p NAME`
`--paper=NAME`

  Size the output for a particular paper size. The NAME should be a PWG 5101.1-2002 paper name. For example, valid values include ‘`iso_a4`’, ‘`na_letter`’, or ‘`na_d`’. You can use the `--paper-names` option (see below) to obtain all valid names.

`-P`
`--paper-names`

  Print paper size names suitable to pass to the `--paper` option and exit.

`-l LAYOUT`
`--layout=LAYOUT`

  When using a paper size, set the orientation of the output. LAYOUT can be one of ‘`auto`’, ‘`landscape`’, or ‘`portrait`’. If ‘`auto`’ layout is used, `lepton-cli` selects the orientation that best fits the drawing.

`-s SIZE`
`--size=SIZE`

  Size the output with specific dimensions. SIZE can be specified either as ‘`auto`’, or as two numbers in the format ‘`WIDTH:HEIGHT`’. If the size is ‘`auto`’, select the size that best fits the drawing.

`-k FACTOR`
`--scale=FACTOR`

  Set the output scale FACTOR. This is a distance identical with 100 points (1 default grid spacing) in Schematic capture coordinate space. It is used to size the output when neither `--paper` nor `--size` are given, and defaults to 100 mil.

`-m MARGINS`
`--margins=MARGINS`

  Set the widths of the margins to be used. MARGINS can be specified either as ‘`auto`’, or as a set from one to four numbers separated by colons. If ‘`auto`’ margins are specified, a sensible default value will be chosen. Up to four margin widths can be provided. If one is provided, it will be used on all four sides. If two are provided, the first will be used for the top/bottom and the second for the left/right. If three are provided, the first will be used for the top, the second for left/right, and the third for the bottom. This is summarized here:

  `-m TOP:LEFT:BOTTOM:RIGHT` |  | all widths defined
  `-m TOP` | → | `-m TOP:TOP:TOP:TOP`
  `-m TOP:LEFT` | → | `-m TOP:LEFT:TOP:LEFT`
  `-m TOP:LEFT:BOTTOM` | → | `-m TOP:LEFT:BOTTOM:LEFT`

`-a ALIGN`
`--align=ALIGN`

  Set how the drawing is aligned within the page. ALIGN can be specified either as ‘`auto`’, or as two numbers in the format ‘`HALIGN:VALIGN`’. ‘`HALIGN`’ controls the horizontal alignment, and ‘`VALIGN`’ the vertical. Each alignment value should be in the range 0.0 to 1.0. The ‘`auto`’ alignment is equivalent to a value of ‘`0.5:0.5`’, i.e. centered.

`-d DPI`
`--dpi=DPI`

  Set the number of pixels per inch used when generating PNG output.

`-c`
`--color`

  Enable color output.

`--no-color`

  Disable color output.

`-F FONT-FAMILY`
`--font=FONT-FAMILY`

  Set the font to be used for drawing text.

`-h`
`--help`

  Display usage information of the command `lepton-cli export` and exit.

`--`

  Treat all remaining arguments as schematic or symbol filenames. Use this if you have a schematic or symbol filename which begins with ‘`-`’.

The `--size`, `--margins`, or `--scale` options described above accept values using units of ‘`mm`’, ‘`cm`’, ‘`in`’, ‘`pc`’, ‘`px`’, or ‘`pt`’. If you do not provide a unit, points are assumed. N.b. that ‘`px`’ are evaluated relative to the current `--dpi` setting.

When using the `--size`, `--margins`, or `--align` options with multiple values, you may use ‘`;`’, or ‘`` ’ (space) as a separator between them instead of ‘`:`’. In such a case, remember to properly quote your arguments to avoid them to be interpreted by your shell.

Next: lepton-cli config, Up: lepton-cli - Lepton command-line utility [Contents][Index]