Direct print to lasercutter

Bug #966244 reported by Sigurd van Hof on 2012-03-27
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
Alvin Penner

Bug Description

We and a number of our customers work with Inkscape. We like to print vector files direct to our printerdriver from Universal Laser Systems. It is not possible to print direct (vectors). We have to print a PDF and then print from PDF to the printerdriver of the machine. Is it possible to fix this small problem?

regards, Sigurd

jazzynico (jazzynico) on 2012-05-12
tags: added: printing
Changed in inkscape:
importance: Undecided → Wishlist
Alvin Penner (apenner) wrote :

a proposal for a new kind of vector graphics printout has been made at the following bug report. Could you try this and see if it helps?

https://bugs.launchpad.net/inkscape/+bug/630639/comments/12
and
https://bugs.launchpad.net/inkscape/+bug/630639/comments/13

Alvin Penner (apenner) wrote :

attaching a response received privately, will try to respond to this in a week or so.
........................................

Dear Alvin,

Great! It seems to work but...

If we have a vectorline (width 0.025 mm) it cuts.(OK) If we have a vector with a thicker line the machine is rastering (OK).

But if we have a square vector with a fill. The fill is ignored (not OK)

Met vriendelijke groet/ Best regards,

Sigurd van Hof

su_v (suv-lp) on 2012-07-02
tags: added: win32
Alvin Penner (apenner) wrote :

attached is a new version of print_win32_vector.py.
this version supports a solid fill.

Alvin Penner (apenner) wrote :

just for completeness, also attached is the .inx file.
this has not changed since the initial posting to Bug 630639

Alvin Penner (apenner) wrote :

attaching a response received privately, will try to respond below:

..................................................................................................

Dear Alvin,

Good job, but I couldn’t download the new version in the right file-format. The link gives plain text in the browser.

Your (old) solution gives 1 problem on my PC and I have 2 other wishes:

 Problem: The py-file effects other the print-option in other Window-programs. This doesn’t work anymore, except Ctrl-P. See pictures/attachments. A solution is to use Ctrl-P.

Wish 1: Is it possible to get the file-name in state of “Inktscape Pyton Print” in the laser-driver, see picture. This makes it simpler to find old laser-jobs.

Wish 2: When I make text in Inkscape then ‘print_win32_vector.py’ don’t work correct, even if I change text from ‘Object’ to ‘Pad’ (Dutch version).

Thanks in advance,

Martin Blijerveld

Alvin Penner (apenner) wrote :

with respect to the Problem: The py-file effects other the print-option in other Window-programs.
I'll look at that more carefully this weekend.

With respect to Wish 1: Is it possible to get the file-name in state of “Inktscape Pyton Print”
- unfortunately, I don't know of any way of getting access to the file name. For those extensions that do import or export of files, the file name is always known, but for the effects on the Extensions menu, I believe that the only file name that is known is the name of a temporary file which is not related in any way to the real file name.

as a possible alternative, I am attaching a new version of the Python code which attaches a time stamp to the name of the print job so that each print job will be unique. could you let me know whether that is helpful?

Alvin Penner (apenner) wrote :

Wish 2: When I make text in Inkscape then ‘print_win32_vector.py’ don’t work correct,

with respect to Wish 2, this appears to be working as far as I can tell.
attached is a demo svg file with the word "Inkscape" in it.
- This was originally text using the font Hobo BT Italic
- Then I used the menu item Path->Object to Path
- Then I opened the Fill&Stroke dialog and removed the fill and set the stroke to be black and set the stroke-width to be 0.1 pixel.
- as far as I can tell this is printing as vector output on my HP Laserjet driver, it will show the text as outlined shapes.

Alvin Penner (apenner) wrote :

with respect to the problem of printing from other applications, I have not been able to reproduce the problem. Here are the steps I took. I have the PLS3.60 driver installed, with no laser attached to it.

- select Extensions ->Win32 Vector Print
- the ULS printer driver dialog loads automatically
- at this point Inkscape is hung because it is waiting for the printer driver dialog to be acknowledged
- however, other applications such as Word are able to print even with the ULS driver dialog present
- in order to print from other applications it is necessary to choose a non-default printer, but that is to be expected
- as soon as OK is pressed on the ULS driver dialog then Inkscape is freed.

Martin (blijerveld) wrote :

Wish 1: Is it possible to get the file-name in state of “Inktscape Pyton Print”

A time stamp is a good second best option, but the laser-driver gives this also.

Martin (blijerveld) wrote :

The problem of printing from other applications:

We have this problem only in programs as WORD (2003) en Outlook (2003). In other programs the printing-function works correct. Mayby the software is to old. Fortunately Ctrl-P works always.

Martin (blijerveld) wrote :

Alvin, thanks for your quick respons

Wish 2: When I make text in Inkscape then ‘print_win32_vector.py’ don’t work correct,

Cutting lines works correct, important is change a item (Path->Object to Path)

but solid fill (to engrave text with a laser) doesn't work correct, see attachment.

Martin

Alvin Penner (apenner) wrote :

yes, I have been able to reproduce the problem with the fill on text, I will take a look at that.

just for curiosity, is it important to be able to do laser cutting at the same time as you do solid fill? I mean that the solid fill will be done properly by a normal print, not this new method. The new method on the other hand does laser cutting of outlines properly. Is it necessary that both types of output must be done by the same method at the same time?

Hello Alvin,

Yes, it's important for us. Many product we make we want to cut en engrave a
name or text at the same time. This saves time to make things and labor is
expensive. Also you don't need to move the material so you can make it more
precisely.

Martin

Onderwerp: [Bug 966244] Re: Direct print to lasercutter

yes, I have been able to reproduce the problem with the fill on text, I
will take a look at that.

just for curiosity, is it important to be able to do laser cutting at
the same time as you do solid fill? I mean that the solid fill will be
done properly by a normal print, not this new method. The new method on
the other hand does laser cutting of outlines properly. Is it necessary
that both types of output must be done by the same method at the same
time?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/966244

Title:
  Direct print to lasercutter

Status in Inkscape: A Vector Drawing Tool:
  New

Bug description:
  We and a number of our customers work with Inkscape. We like to print
  vector files direct to our printerdriver from Universal Laser Systems.
  It is not possible to print direct (vectors). We have to print a PDF
  and then print from PDF to the printerdriver of the machine. Is it
  possible to fix this small problem?

  regards, Sigurd

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/966244/+subscriptions

Alvin Penner (apenner) wrote :

thanks for the info, I'll look into it.

Alvin Penner (apenner) wrote :

attached is a new version of print_win32_vector.py. This version should fill the text properly as far as I can tell.
When using filled text, after converting it to path as usual, it may be necessary to go into the Fill and Stroke editor to refresh the Fill Color. This can be done by bumping up one of the colors by one or two counts and then returning the color back to normal. Otherwise the individual letters may not inherit the color from their parent group as they should.

Other than that the print job name has been modified to be the filename, or to be more precise, the quantity sodipodi:docname. This will normally be the filename after the file is loaded, but it may get modified later, due to some known bugs in this property, Bug 243162 and Bug 1024690

as usual any feedback would be welcome.

Alvin,

Good job! It seems to work good.

When I have feedback I put it on Launchpad.

NB: Download py-file with Firefox works correct, Explorer didn't work
correct.

Martin Blijerveld

Symbio6
Maartensweer 9
2265 DH Leidschendam
The Netherlands
( +316-46340676
( +3170-3265609 (algemeen)
* <email address hidden>
8 www.Symbio6.nl
8 www.Sjablonen4You.nl
KvK-nummer 27266677

Symbio6 Maatwerk zonder Meerkosten
-----Oorspronkelijk bericht-----
Van: <email address hidden> [mailto:<email address hidden>] Namens Alvin
Penner
Verzonden: donderdag 19 juli 2012 3:32
Aan: <email address hidden>
Onderwerp: [Bug 966244] Re: Direct print to lasercutter

attached is a new version of print_win32_vector.py. This version should fill
the text properly as far as I can tell.
When using filled text, after converting it to path as usual, it may be
necessary to go into the Fill and Stroke editor to refresh the Fill Color.
This can be done by bumping up one of the colors by one or two counts and
then returning the color back to normal. Otherwise the individual letters
may not inherit the color from their parent group as they should.

Other than that the print job name has been modified to be the filename,
or to be more precise, the quantity sodipodi:docname. This will normally
be the filename after the file is loaded, but it may get modified later,
due to some known bugs in this property, Bug 243162 and Bug 1024690

as usual any feedback would be welcome.

** Attachment added: "print_win32_vector.py"

https://bugs.launchpad.net/inkscape/+bug/966244/+attachment/3227887/+files/p
rint_win32_vector.py

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/966244

Title:
  Direct print to lasercutter

Status in Inkscape: A Vector Drawing Tool:
  New

Bug description:
  We and a number of our customers work with Inkscape. We like to print
  vector files direct to our printerdriver from Universal Laser Systems.
  It is not possible to print direct (vectors). We have to print a PDF
  and then print from PDF to the printerdriver of the machine. Is it
  possible to fix this small problem?

  regards, Sigurd

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/966244/+subscriptions

Alvin Penner (apenner) wrote :

committed to bzr rev 11575

this extension has not been added to the makefile.am file, in the hope that it will not be distributed on non-Windows systems, since it will work only on Windows.

Changed in inkscape:
status: New → Fix Committed
egradman (eric-gradman) wrote :

Wow, this is exactly what I've been looking for. Its nearly working with my ULS M300, however all output is scaled approximately 1.2 times. That is to say, a square measuring 1x1" comes out 1.2x1.2". If I knew the *exact* scale factor, I could correct for it in the driver settings. Can I "intercept" the GDI output somehow and interrogate the file to learn the scaling factors?

I rather figure out where that scale factor is coming from.

Almost free from the tyranny of illustrator... Thanks alvin.

egradman (eric-gradman) wrote :

I captured the SPL file, used an SPL viewer to print it to XPS, and gxps to convert it to PDF. Yikes. The scale factor I'm seeing is exactly 1.2. But... I was wrong about being able to correct for this in the driver.

I tried fixing this in the print_win32_vector.py file... I found the one identity matrix in process_clone and scaled it by 1.0/1.2. But it didn't change the output, so I must be poking at the wrong bit.

Thoughts?

egradman (eric-gradman) wrote :

Oh man, I opened the Inkscape svg in Illustrator and everything is scaled. Which suggests there's a difference in the point/inch ratio between the two. Which means that the problem probably doesn't lie in the print_win32_vector.py file, which means I'm commenting on the wrong bug report. Sorry!

egradman (eric-gradman) wrote :

FIXED: https://gist.github.com/3505084

applies a global scale factor before printing entire document. YMMV... worked for me!

Alvin Penner (apenner) wrote :

not sure if this addresses your problem or not, but I should mention that the default unit of measure in Inkscape is the pixel at resolution 90 dpi. In a program like Illustrator it is quite likely that they are using points at a resolution of 72 dpi. The ratio of the two is 1.25.
    Other than that, if that is not the issue, could you submit an svg file which illustrates the problem?

su_v (suv-lp) on 2012-09-27
Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: none → 0.49
Bryce Harrington (bryce) on 2015-02-21
Changed in inkscape:
status: Fix Committed → Fix Released
Rick-firefang (rick-firefang) wrote :

I've submitted a patch to win32 Cairo so that it properly sends anything smaller than the device's smallest unit size as a hairline (0.001" works) so you can print directly to laser printers now: https://lists.cairographics.org/archives/cairo/2018-October/028767.html

Of course, these lines are hard to see, so I've also created a patch in Inkscape for a new display mode that makes "hairlines" (anything smaller than half a pixel on screen) more visible: https://gitlab.com/inkscape/inkscape/merge_requests/365

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers