graphtecprint

graphtecprint is a driver / cutting application for the desktop plotter / cutter Graphtec CC200-20 or any of the OEM models based on it, such as the QuicKutz Silhouette (and reputedly Xyron Wishblade). It may work on other Graphtec devices as well, but it’s so far only tested on the CC200-20. It was developed on Linux, but in theory it should work on other Unix-like operating systems, too, and perhaps even Windows (not tested!). The rest of this page will assume that you’re using a Linux distribution.

Update Feb 2nd, 2008: Rick Stuart has helpfully provided me with the changes necessary to make graphtecprint work with his (first generation?) Wishblade! I will release a version 1.0.1 shortly, which will support this device properly.

Requirements

First of all, and unsurprisingly, you need a compatible Graphtec cutter.

To see if you have a compatible device, run “lsusb”. You should see a line looking something like this, the important bit in bold:

$ lsusb
. . .
Bus 001 Device 003: ID 0b4d:110a
. . .

If the numbers differ you likely have another model, but it might still work.

You can also use the “usb_printerid” utility that comes with “foo2zjs” package you may or may not already have installed:

$ sudo usb_printerid /dev/usb/lp1
GET_DEVICE_ID string:
MANUFACTURER:Graphtec;MODEL:CC200-20;CLASS:PRINTER;DESCRIPTION:Graphtec CC200-20;

graphtecprint requires the following packages to be installed:

  • python (tested with 2.5, other versions may work)

  • python-gtk2
  • python-glade2
  • python-cairo
  • pstoedit (tested with version 3.44, others may work)
  • ghostscript

If you are using Debian or a Debian based distribution, such as Ubuntu, running “sudo apt-get install ” should do the trick. For other distributions, follow the normal procedure of finding and installing software. Chances are that several of these are installed already. Your mileage will vary.

Installing

There are two ways of “installing” graphtecprint. The first way is to install it alongside other installed programs:

tar xvzf graphtecprint-1.0.tar.gz
cd graphtecprint-1.0
sudo cp graphtecprint /usr/local/bin/
sudo mkdir /usr/local/share/graphtecprint
sudo cp *.png *.glade /usr/local/share/graphtecprint

Alternatively, the program and data files can be installed in their own separate directory, e.g. /opt/graphtecprint:

tar xvzf graphtecprint-1.0.tar.gz
cp -a graphtecprint-1.0 /opt/graphtecprint

Usage

The program was primarily tested to work with Inkscape, but in theory, all applications capable of printing PostScript to a file or a pipe should work. If you come across a program whose output does not work, feel free to inform the author. (Note that raster graphics from programs such as the GIMP can’t possibly work. Only vector graphics elements will be parsed by this program.)

To cut using Inkscape, open or edit your file of choice, then go to the File menu and select Print. In the Print dialog, select “Print using PostScript operators”. Under “Print destination”, type “| graphtecprint” (the first symbol is a pipe symbol). If you have installed graphtecprint under a directory that’s not in your path you must enter the full path instead, e.g. “| /opt/graphtecprint/graphtecprint”

If you’re using another application, see if it can print to a pipe directly. If so, the procedure should be very similar to the one above.

If the application can not print to a pipe, chose “Print to file” (most applications should offer this) and select an appropriate file name. Then, in a terminal window, run “graphtecprint < somefile.ps", substituting "somefile.ps" for the name of the file you just printed to.

If everything goes according to plan, you should now get the main dialog window. If not, check your program's terminal for error messages that may explain what went wrong.

Screenshot

Notes

Everything should be more or less self-explanatory, but there are some things to note:

- You need write access to the USB device file! (The “Device” pulldown menu should list the detected cutter and its character device. To give yourself (everyone, actually, so beware) write permissions, open a terminal window and run the command “sudo chmod a+rw /dev/usb/lpX”, where X is the number of the device shown in the pulldown menu.)

- Paper size should match the page size from your application. This information doesn’t make it through the format conversions, unfortunately.

- Orientation is hardcoded to portrait so far, as the overlying application would normally do the work of rotating it if it is a landscape drawing.

- The fine tuning buttons will not work with the usblp driver. For these to work you will need a separate driver for the cutter, or possibly a patched usblp driver. None of these options are implemented yet, but they might be in the future.

Download

The latest version is 1.0 and can be downloader here:
graphtecprint-1.0.tar.gz

8 Responses to “graphtecprint”

  1. Brian Says:

    Greeting! First of all, I love your choice of tools. Python, gtk, and glade are my favorites…

    I almost have this working, hoping for some help.
    I’m running ubuntu gutsy, and have a graphtec identifying itself as ID 0b4d:110a as above.

    I get the GUI up, with the correct preview (tried directly out of inkscape and by redirecting the postscript from inkscape to graphtec print), but when I hit “print”, it does the “track enhancing” back and forth with the paper (even though that option is off) and it stops. No cutting. :( Then I get the following error from the terminal screen:

    =====================================
    graphtecprint: Warning: Unexpected reply: ‘V2.30 \x03′
    Traceback (most recent call last):
    File “/usr/local/bin/graphtecprint”, line 418, in
    res = doit(dialog.settings)
    File “/usr/local/bin/graphtecprint”, line 268, in doit
    f.write(”M%.3f,%.3f\x03″ % p)
    TypeError: float argument required
    =====================================

    when I look at the python code (line 268), it appears that there’s modulus division by a “list” on the string going to the printer?

    Feel free to contact me if I can help with troubleshooting… I would LOVE for this to work!! :)
    –Brian

  2. Aaron Spike Says:

    Fantastic work! The scrapbooking communities will really appreciate your work. You may also be interested in the work I started a while back at understanding the GSD file format.

    http://code.google.com/p/cuft/

  3. Ulisses Says:

    Great, this exactly what I was looking for!!!

    As Brian I had the same issue here, I’m using Ubuntu 7.10, so it may be something related to the Python version…
    Anyway, I also had to make some adjustments in the code to make my Wishblade to be recognized.

    This are the changes that I did:

    I changed from:
    for s in strokes:
    p = s[0]
    f.write(”M%.3f,%.3f\x03″ % p)
    for p in s[1:]:
    f.write(”D%.3f,%.3f\x03″ % p)

    to:
    for s in strokes:
    p = s[0]
    f.write(”M%.3f,%.3f\x03″ % (p[0], p[1]))
    for p in s[1:]:
    f.write(”D%.3f,%.3f\x03″ % (p[0], p[1]))

    And changed from:
    if not p.has_key(”CLASS”) or p[”CLASS”] != “PRINTER”:
    continue
    if not p.has_key(”MANUFACTURER”) or p[”MANUFACTURER”] != “Graphtec”:
    continue

    To:
    if not p.has_key(”CLASS”) or p[”CLASS”] != “PRINTER”:
    continue
    if not p.has_key(”MANUFACTURER”) or ((p[”MANUFACTURER”] != “Graphtec”) and (p[”MANUFACTURER”] != “Wishblade Inc.”)):
    continue

    So now everything is working fine :)

    I’m using Inkscape to cut on my Wishblade

    Thanks,
    Ulisses

  4. gary Says:

    This is just what I need BUT……
    I need the same interface but for hpgl output, actually to a roland camm1 vinyl cutter and camm2 engraver. Both use hpgl branded as camm-gl. In a month or so I may have some spare change :) to pay someone to adapt the driver. The camm’s are already installed but no direct drivers. I have to print via windows via vmware, way to much trouble, If I could print from inkscape I’d be a happy man. If you get a chance take a look at the windows driver for the camm2 series at rolanddg.com. I have spent the day trying to get scaling down right in pstoedit and hpgl-distiller. It draws the right shape with no hpgl errors but scaling make no logical sense.
    Thanks

  5. Jared Says:

    I have the Quickutz Silhouette craft cutter and running Ubuntu 7.10. I am getting the error “No Graphtec device found!” when attempting to print from Inkscape vector illustrator. It shows in Bus 002 Device 003: ID 0b4d:110a. I have installed all the packages listed in the forum. Any ideas on what I’m doing wrong?

  6. vidar Says:

    Jared: Hmm, permissions, perhaps? (See under “Notes” above.)

  7. Ulisses Says:

    Jared, if the permissions tip do not solve your problem, check also these two:

    1) You may need to add the Shilhouette string in the program, for this include the “MANUFACTURER” string which appears on usb_printerid /usb/lpx if it is different from “Graphtec” (see my comments before on how to do this)

    2) Everytime you turn on/turn off your cutter, Linux (at least my Ubuntu too) will lost the permissions on this device, so you will need to run the “sudo chmod a+rw /dev/usb/lpX” command again. What I did on my Ubuntu 7.10, I included my user on the “lp” group, so I don’t need to worry about, so I recommend you to do too.

    Hope this helps,
    Ulisses

  8. Nico Says:

    Super! Great work. I’am using graphtecprint with the adaptions of Ulisses. Plotting on a Quickutz Silhouette.

Leave a Reply


sufficient-slavish