Print driver question

Tech_Marco
Posts: 4351
Joined: Mon Jun 15, 2009 3:00 pm

Print driver question

Postby Tech_Marco » Sun Jul 24, 2016 5:04 pm

Hi folks:

I discussed with the programmer 'Li' about the print driver. I think he may hit the curve by finding driver sources and he was wondering if he could pay for some sources code for the driver? I'm not a programmer so I know nothing about it. Anyone with programming background want to feed some output here?

If he doesn't do the Print driver, then he need to create 'add-on' VB module for CorelDraw, Illustrator, AutoCAD,... InkEscape. But, the problem is that application developer from Illustrator or AutoCAD ares keep changing and the source is not opened, he has hard time to catch up. That's why LaserCad sometimes can't import DXF files or AI files properly. We got to make sure that the LaserCad can handle some version if not all version. Your input is greatly appreciated!


Thanks
Marco

als
Posts: 24
Joined: Sat Jan 23, 2016 1:01 am

Re: Print driver question

Postby als » Wed Jul 27, 2016 3:59 pm

Marco,

Have Li search for "XPSDrvSmpl". There is a sample driver that Microsoft provides on GitHub (http://github.com/Microsoft/Windows-dri ... PSDrvSmpl/). Be warned however that it is not a "simple example" with clear explanations. I don't think that there is such a thing as a simple Windows Printer Driver. And frankly it is probably a project too big for a single developer with other responsibilities.

I've written other types of device drivers, but not a print driver (which is no longer a traditional kernel-mode driver), so take that advice for what it is worth. If I could find a clear guide on writing such drivers, I would volunteer to produce one that drives something simple like an Arduino controlled LCD, just to give Li an example (and to learn).

You might consider contracting with Qualsoft or Radix, or another consultant that has experience with Windows Print Drivers. Focus on an XPS or Open XPS driver as the old GDI and Unidrv models probably will not be supported on Windows 8, 10, and above.

ANOTHER OPTION would be to focus on reading PostScript or XPS/OXPS documents and turning them directly into something that can be sent to the DSP controller. There is already an XPS print driver on Windows, and the file is nothing more than a ZIP file containing several XML documents and resources, including fonts. Microsoft even provides an API for reading, editing, etc. XPS documents. (https://msdn.microsoft.com/en-us/librar ... 76(v=vs.85).aspx) If CorelDraw, Illustrator, and AutoCAD can print to the XPS print driver, the file could be opened by LaserCAD using this API. If they can print at all with sufficient detail it is likely that this will work. Inkscape CAN print to the XPS driver.

And once again, if you make the LaserCAD software OpenSource (after all, you make the money on the DSP controller, not the software, right?), you will have a small army of developers capable of fixing bugs and adding features - including converters from other CAD/design packages. It should for example be a simple thing to add the ability to make grayscale images by varying laser power while drawing a bitmap. By keeping the source closed however you are limited to the number of developers that you can afford to pay. And features come at such a slow pace that I've already been toying with the idea of pulling out this extremely expensive DSP controller and replacing it with a RAMPS controller (or my own variation) so that I can get it to do the things LaserCAD can't do yet.

It looks like LaserCAD 7.79.2 fixes the font issue I reported. That took many months even after I posted an explanation of how to fix the bug, and provided code that injected into LaserCAD to fix the bug. I point that out to show that you could get features out faster if you make the device friendly to your user base that has development skills.

Best Wishes,
Andrew


Return to “Tips and new on the DSP & Software”

Who is online

Users browsing this forum: No registered users and 1 guest