Comment 47 for bug 630639

Revision history for this message
J Matthew Gaskill (jmgaskill) wrote :

...thanks Alvin; great help -- while new to python I do have a bit of programming experience so I followed your suggestion and took a stab at it.

The crux of the problem with using Inkscape to generate files for ULS Laser Cutters is the lack of a "hairline" stroke designation (stroke-width=0 but still visible when rendered). Looking through the options natively available within Inkscape it seems that designating a stroke of "1 pt" more or less captures the intent (at least until "hairline" or " non-scaling-stroke" is implemented per SVG 1.2). We typically use units of "in" or "mm" to create geometry for the laser which leaves "pt" essentially untapped (as long as an equivalent dimension in a another unit not used).

Setting "vector" strokes to width=1 pt and adding the following lines to print_win32_vector.py after line 67 takes care of the rest:

if style['stroke-width'] == '1':
    stroke = 1

The next issue is the requirement to use the default printer; one would assume there must be a way to create a printer dialog of some sort then allow the user to select the printer she would like to use; perhaps along with the assistance of these resources:

https://mail.python.org/pipermail/tutor/2010-September/078869.html
https://msdn.microsoft.com/en-us/library/windows/desktop/dd144911(v=vs.85).aspx
http://www.pinvoke.net/default.aspx/winspool.GetPrinter