[Wishlist] [Win32] Support improvements to the print_win32_vector extension
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
In Progress
|
Wishlist
|
AMcBain |
Bug Description
Inkscape: .92.2
OS: Windows 10 Home
It's been noted in various tickets (such as issue #1662531 ) the Print Win32 Vector extension is pretty lacking in support for the features available in SVG. I have updated its level of support. Attached to this ticket are the updated py and inx files for the extension.
Originally supported:
- <path>
- <rect> (ignored rx and ry)
- viewBox scaling (latest .92.x source only)
- printing to the system's default printer
Original problems:
- everything was printed with a stroke
- stroke was not scaled according to the current transform
- strokes must have a near-zero width in printer units to be treated as vector lines
- CSS display: none; was only respected on <g> tags
- allowed printing empty documents or documents for which no tags were printed
- document names did not show up on the target device
Support added:
- <rect> with rx and ry
- <circle>
- <ellipse>
- <line>
- <polyline>
- <polygon>
- <text>*
- <flowRoot>*
- CSS stroke-linecap
- CSS stroke-linejoin
- CSS stroke-miterlimit
- CSS fill-rule
- "job type" selector to print only
Support changed:
- only tags with a stroke get printed with a stroke
- stroke is now scaled based on the current transform
- users can choose the maximum stroke width threshold for triggering output of vector lines
- CSS display: none; is respected on any supported element
- empty documents now print a single "do nothing" instruction (as otherwise they hung my Epilog!)
- document names are now properly sent across and displayed
I did port the viewBox scaling changes from the latest repository version, but that's not really a support change or addition as it would have been released with the next version to have the fix.
* These are handled by Inkscape (see following paragraph)
This bug is kind of related to issue #843260 as handling of text requires I launch a new version of Inkscape to convert them, close it, then read back in the changed document. This causes a flash of an Inkscape window (as noted in the aforementioned ticket and elsewhere) which I would be keen to avoid. I already reduce the chance of this by checking if I have any text to convert first, which also likely saves some time printing a document.
Testing:
All parts have been tested by me with my 60W Epilog Mini 24. Tina Tenbergen (ttenbergen) tested the code up to revision 4f5f2ee6eda804b
Repository:
https:/
This includes a test SVG with everything but text tags in it (though this has been tested separately) and a reference JPG showing the intended output on a laser cutter. The good news is, however, for those who don't have one you can still try it with your laserjet. ;)
Backstory:
I help provide a laser cutting resource in the form of an 60W Epilog Mini 24 to a makerspace and at least one person there would like to be able to use Inkscape instead of CorelDRAW due to familiarity and as their designs originate in Inkscape as well. As I also use Inkscape for many designs I happened to find the Print Win32 Extension offered better vectorizing on Windows and decided to tackle the lack of support for many SVG particulars.
tags: | added: extensions-plugins |
Changed in inkscape: | |
milestone: | 0.92.3 → 0.92.5 |
I forgot to finish a line above. '- "job type" selector to print only' should read:
- "job type" selector to print only vectors, rasters, or both
This also allowed me to add back in compatibility with the original extension's behavior of adding strokes to items that didn't have any by way of a separate job type. This "compatibility mode" benefits from the newer text, tag, and CSS support I added. (It seemed like too much work and too cruel to do otherwise.)