0

I have an application that prints QR code stickers. It works fine. Now I'm wondering if I can create an XPS document to view the QR code on the monitor before printing it.

I tried setting Microsoft XPS Document Writer as the printer in the openport function but that didn't work.

openport("Microsoft XPS Document Writer");
setup("80 mm", "51 mm", "4", "15", "0", "3 mm", "0");
clearbuffer();
windowsfont(34, 235, 24, 0, 0, 0, "Arial", "Some String:");
windowsfont(34, 260, 24, 0, 0, 0, "Arial", str);
sendcommand("QRCODE 52, 30, M, 7, A, 0, M2, \"some string\"");
sendcommand("BOX 10,10,294,294,4");
printlabel("1", "1");

I read this article but my problem is that I don't have an XPS file to print. I'm not even sure where to start. I've been googling to find how to do this but I haven't found anything that helps me.

Is there a way to get the command that I'm sending to the TSC printer in a way that can be used by the XPS Document Writer or maybe get the value of the image buffer?

Artemis
  • 413
  • 3
  • 10
  • 24
  • The problem is, you are using the printers inbuilt functions to generate the QR code – Keith Nicholas Feb 21 '17 at 04:41
  • @KeithNicholas I just followed the programming manual that came with the printer. I didn't even consider not using those inbuilt functions tbh. Is there no way to achieve what I'm trying to do while using those functions? – Artemis Feb 21 '17 at 05:15
  • not simply, you have to render it yourself. For instance Label designers render their own version of things like QR codes, then when sending it to the printer, they have drivers that try to use native facilities like you are using. You can render everything in raster formats, but then printing would be a lot slower – Keith Nicholas Feb 21 '17 at 20:39

0 Answers0