draftcraft

Plotters

A plotter (output device) decides what a plot writes and on which paper sizes. Page setups and plots pick a device and one of its papers. Each paper carries margins, which bound its printable area. Layouts show the printable area as a dashed outline on the sheet.

Devices

The built-in devices come first:

Device Output
CADCraft PDF vector PDF
CADCraft PNG raster PNG on white paper at the device resolution (300 dpi)
CADCraft SVG vector SVG

They offer the standard sizes:

ISO sheets have 5 mm margins. Inch sheets have quarter-inch (6.35 mm) margins. A page setup with the device None plots to PDF on the page setup’s paper, as before.

User devices are files in our own format, kept in the plotters folder of the CADCraft settings directory:

System Folder
Linux and FreeBSD $XDG_CONFIG_HOME/cadcraft/plotters or ~/.config/cadcraft/plotters
macOS ~/Library/Application Support/CADCraft/plotters
Windows %APPDATA%\CADCraft\plotters

CADCRAFT_CONFIG_DIR replaces the settings directory; empty means none (cadcraft-cli: --config-dir, which falls back to the same variable). On the web, devices last for the session unless the host provides storage (cmd::plotters::set_plotter_store). Binary .pc3 files are not read; we haven’t found a public specification of that format.

Files

<name>.plotter.json, UTF-8 JSON with a format marker:

{
  "cadcraftPlotter": 1,
  "name": "Office A3",
  "description": "Raster proofs",
  "output": "png",
  "resolution": 150,
  "orientation": "landscape",
  "defaultPaper": "A3 borderless",
  "papers": [
    { "name": "A3 borderless", "width": 297, "height": 420, "margins": [0, 0, 0, 0] },
    { "name": "ISO A4 (210.00 x 297.00 MM)", "width": 210, "height": 297, "margins": [5, 5, 5, 5] }
  ]
}

Reading fixes hostile values:

In the file name, characters other than letters, digits, spaces and -_()+, become _.

Commands

Model-space PDF plots don’t apply the paper’s margins yet. They fit the drawing inside the default margins. PNG plots apply them. SVG plots show a layout’s whole sheet, or the model-space extents.

Plot transparency

Objects plot with their transparency (their own, their layer’s when ByLayer, the block reference’s when ByBlock) only when asked, as in AutoCAD:

PDF plots write it as alpha (/ExtGState with /ca and /CA), PNG plots blend it, SVG plots use opacity. A plot without transparency is written exactly as before. The DXF plot layout flags have no bit for the option, so it isn’t saved in DXF or DWG files.

On screen, TRANSPARENCYDISPLAY (on by default; the status bar’s Transparency button) shows transparency; PNG and SVG exports of a drawing always draw it.