DeclaraCAD can load .svg and .pdf documents created with other design tools such as Inkscape or Horizon-EDA.

To use them create a Svg or Pdf node and specify the source attribute with a path of the document to load. The resulting shapes will be sets of wires that can be introspected using the topology and processed with your own scripts, included in further operations, and/or used for g-code generation.

These provide additional attributes such as center, scale, and mirror to center the drawing, re-scale it, and mirror it about the x-axis respectively.

enamldef Assembly(Part):
    Axis:
        color = 'black' # Show axis
    Pdf:
        source = 'path/to/solder-paste-stencil.pdf'

A PCB created with horizon. Stencil in Horizon

The solder paste stencil exported to a pdf and loaded in DeclaraCAD. Stencil in DeclaraCAD