cat infile.eps | pstoedit -f "hpgl" > /dev/ttyS0
pstoedit -f hpgl /kissmy.eps /kissmy.plt
What is HPGL-Distiller?
HPGL-Distiller is a small program that was written to filter out
aspects of a HPGL file which are not
relevant for various HPGL output devices, typically vinyl cutters. The
original reason for filtering
out the irrelevant codes was that my own personal vinyl cutter was
responding poorly to the excess data.
http://pldaniels.com/hpgl-distiller
With the use of HPGL-Distiller, you can now finally use your favorite programs like Inkscape, QCAD, GIMP and many others to produce professional vinyl cutting output results without having to jump back to Windows(tm). |
How does it work?
The HPGL-Distiller is actually a very simple program (even written in
C) that breaks the incoming
HPGL data stream into individual HPGL commands and simply copies or
ignores each command based on the built in list of 'acceptable' HPGL
commands. A lot of HPGL commands generated by pstoedit pertain
to aspects of plotting like line type, width, pen colour, pen width and
such, all of which aren't always relevant, especially in the cutting
processes.
It should be pointed out that as you go up in the range of the plotters/cutters, the HPGL feature set they support will tend to increase (ie, supporting arcs, circles, rectangles natively).
How do I use it?
HPGL-Distiller is used as a post-processing tool after converting an
existing vector format (SVG, DXF, EPS etc) into HPGL via 'pstoedit'. By default the
output of the pstoedit (with -f plot-hpgl) contains a lot of HPGL
commands which are of no relevance to the final vinyl cutter in
question.
pstoedit -f plot-hpgl imagefile.eps fulloutput.hpgl
hpgl-distiller -i fulloutput.hpgl -o distilled.hpgl
(subsequently you can possibly output the distilled HPGL to your
cutter using 'cat distilled.hpgl > /dev/ttyS1 )
What software licence is this released under?
HPGL-Distiller is released under the modified BSD licence. This means
that it's compatible with other licences like GPL as well as being
commercial/closed-source friendly.
Download
http://pldaniels.com/hpgl-distiller
CHANGELOG
hpgl-distiller-0.9.1.tar.gz
hpgl-distiller-0.9.0.tar.gz
Installing
Installation is quite simple, a two step process
pstoedit -f plot-hpgl $INF $OUTFand changed in print-to-cutter.sh
to
pstoedit -f hpgl $INF $OUTF
Subject: Success with Roland Camm-1
From: Bruce WestfallTo: linux_vinyl_cut/3x6.nl Date: Wed, 19 Mar 2008 13:33:24 -0400 I used the instructions you had on the page, but changed a bit in the print-to-cutter script: Here it is with the comments removed ---------------------------------------- CUTTER=/dev/ttyS0 stty 9600 cs8 -parenb -parodd crtscts -ixon -ixoff -F /dev/ttyS0 TMPDIR=/tmp INF=$TMPDIR/cutter.$$.eps OUTF=$TMPDIR/cutter.$$.tmp HPGL=$TMPDIR/cutter.$$.hpgl REMOVE_INF=0 reading from STDIN # if [ $# -eq 1 ]; then INF=$1 else cat > $INF REMOVE_INF=1 fi pstoedit -xscale 1.115 -yscale 1.115 -f plot-hpgl $INF $OUTF hpgl-distiller -i $OUTF -o $HPGL ---------------------------------------- I commented out the part that removes the old files so I can see what is going on. Print command is: | /home/bruce/hpgl/print-to-cutter.sh In my Inkscape preferences.xml, the following is now there: Works great is is EXACTLY to scale!! Thanks for making this available! Subject: Experiences with HP plotters... Date 6 april 2008 Hello, my name is Jim D, I live in East Tennessee, USA. I have visited your site a number of times over the last several years. I have owned two models* of HP plotters, and wanted to share intereseting things I have learned. I used to have the Draftsmaster 2 7596A, I now have the Draftsmaster MX plus, I like the MX much better, it has a 62 inch plot length, twice that if tiled. So, some things I have learned: My two year old child smashed an extra carousel against something, and the plastic piece that moves up and down (one below each pen) came off. The spring came out. I realized that the spring and piece were not broken, they can be carefully removed at will. So later, when I was cutting very expensive translucent vinyl for a backlit sign, I was having difficulty getting the Mimaki blade holder to be picked up by the plotter carriage. The spring loaded slide up and down piece below the knife holder, on the carrousel wasn't letting it go. The Mimaki is quite a bit taller than my Roland, so that was the problem. But the adjustable Mimaki cuts much better. Then I remembered that the piece can be removed. The knife holder still holds in the carrousel just fine, with the piece removed. I think it is just there to keep pens from drying out. I have 3 knife holders: A Roland, a Mimaki, and an aftermarket German one. The last 2 a freind gave me when he bought a Chinese plotter. The German one needs to swivel easier, but I think that is little problem, probably just lubrication. I have become very interested in Inkscape software. The trace program saves me HOURS of time. I am a proffessional sign maker. But my Corel Draw is old, version 8. It will not open the SVG file from Inkscape. Inkscape will not send drawing to old HP plotter, even with expensive aftermarket driver. Then, I discovered that Inkscape will save a file as an Oo file extension. ( Open Office .org ) For whatever reason, the Open Office draw program WILL send a drawing to the HP plotter. Very nice. But, it gets better. For months, I have been trying to get a way to save an Inkscape file so that my old Corel 8 will see it. I'm aware of the psEdit, but it requiresa $50 plug in, and blah, blah, blah, what a hassle. Just 2 or 3 nights ago, I realized that Inkscape will save as EMF (encapsulated meta file? ). this is not the EPS, that did not work for me. But the EMF did. Now I can do anything with the files I want. I could have just bought Corel 10 from ebay to open SVG in Corel, but money has been difficult lately. The EMF file was very good news for me. You might want to try the Open Office freeware. If you haven't seen it lately, it now has 5 parts, one of them is a vector draw program. Before I got the MX plus, I was thinking seriously about how to change the plot length of the 7596A. I learned that the limits are stored in e-prom chip. ( E programable ) In order to change the settings, you need to remove the chip, ( it is large ) and put it in a board made for this purpose. Then, with the right software, you look at all the settings on the chip, change the ones needed, and reinstall the chip. I would also get rid of that bothersome check paper size feature in these plotters. I took great interest in your efforts to use Linux/Inkscape together. I will study all that you have done. Myself, I think the Linux people need to worry less about making a new version every 6 months, and put effort towards hardware issues. Not many modems compatible, not many wireless connections either. Probably not many plotter drivers. That is what makes your work intertesting. I will study it. *I have two extra 7596a models, and a destop model in the attic. I "rescue" them like some people rescue stray cats or dogs. But hey, a lot easier to deal with, eh? No feed, no stink. I will talk to you later, THANKS for the site, Jim D. comment linux open office is verry slow on my fedora linux pc (especialy the menus) i do not understand that you cannot use inkscape to save or send as old hpgl style with the info on this page you can use inkscape to send old style hpgl to plotter (hpgl-distiller) http://pldaniels.com/hpgl-distiller ok not sure to me = maybe you run inkscape / openoffice on ms windows