back to articles

How to Use a 3D Printer as a Pen Plotter

by Matthew Rayfield on March 6th 2018

I've always liked the idea of a pen plotter. A robotic device that draws whatever I want, however I want, with whatever I want. There's more freedom to such a device than an ink or laserjet printer. Soon after I got my cheapo Anet A8 3D printer, I realized that my dream pen plotter could be had with barely any modification. Oh boy !

It took a bit of work to mount the marker or pen of my choice, and quite a bit more figuring to get the Gcode generated. But now that I've found the method that works, it's easy to have my Anet draw up whatever I want it to. Below are instructions on how you can do the same.

These instructions should work with any 3D printer that allows you to run your own Gcode. But unless you have an Anet A8, you'll have to figure out yourself how to attach the writing implement of choice. Really though, you could just use duct tape...

Step 1: Ready Your Vector Image

  1. Create or otherwise obtain a vector image you want to have drawn
  2. Using Adobe Illustrator or Inkscape do the following:
    1. Make sure your artwork is all stroked paths and no fills
    2. Make sure you're using a "Basic Brush" (in Illustrator... I don't know what this is called in Inkscape)
    3. Also ensure that there are no hidden layers (they will be drawn even if hidden)
  3. Export artwork to SVG

Step 2: Setup LaserWeb

  1. Download and install LaserWeb: LaserWeb Binaries Download Page
  2. Open LaserWeb and go to the "Settings" tab then the "Gcode" section and enter the following settings into each corresponding text box:


    G21      ; Set units to mm
    G90      ; Absolute positioning
    G28      ; Home
    G0 Z10.0 ; Go to 10mm on Z Axis a.k.a. Pen up


    G28 ; Home


    G0 Z5.0 ; Pen down


    G0 Z10.0 ; Pen up

    Note: You may want to adjust the height for pen up and pen down in the above code if you have need to do so. I use 5mm as pen down so that the 3D printer nozzle is nowhere near the paper and 10mm for up so that the marker is definitely OFF the paper. If I was drawing on something thicker, I would adjust both accordingly.

Step 3: Convert to GCode

  1. In LaserWeb, go to the "Files" tab, click "Add Document" and choose your exported SVG
  2. If it doesn't look correct, run it through my SVG fix tool (here: SVG Fixer) and load the modified SVG into LaserWeb
  3. Size and position the artwork in LaserWeb by clicking the document name and using the positioning popup window
  4. Drag document to the "Drag document(s) here to add" area.
  5. Enter feed rate (I use 5000 mm/min or so)
  6. Click "Generate" button to generate the Gcode
  7. Click the disk icon to save Gcode

Step 4: Attach Pen Holder Bracket

  1. If you have an Anet A8 your can print and attach my bracket found here: anet-a8-pen-holder.stl (you'll need a rubber band too)
  2. Make and attach your own bracket, or use tape

Step 5: "Print"

  1. Run the following positioning Gcode:
  2. POSITION.gcode

    G21                         ; Set units to mm
    G90                         ; Absolute positioning
    G28                         ; Home
    G0 Z10.0                    ; Pen up
    G1 X35.0 Y215.0 S1.00 F3000 ; Move to upper left of bed
    G0 Z5.0                     ; Pen down

    Note: Adjust the above Gcode to move to the area where you want to "load" the pen. I use the upper left of my printer which is X35.0 Y215.0

  3. Insert the pen into bracket or tape it, or whatever, just get it stuck there and touching the paper
  4. Run your generated "print" Gcode
  5. Sit back and enjoy the show !

Congratulations you've just successfully drawn a 2D image with your 3D printer !

back to articles