Unable to create QRCode and DataMatrix barcode - POS for .NET 1.14 RRS feed

  • Question

  • In 2016 there has been a similar request https://social.msdn.microsoft.com/Forums/en-US/629ad8b5-8323-4a1f-b97b-ebcece732aa0/unable-to-create-qr-barcode-opos?forum=netfxbcl that has never resulted in a solution.

    Now at the end of 2017 we still have the problem that an OPOS application using POS for .NET 1.14 can't use the PrintBarcode function to print a QR code and a DataMatrix barcode.

    The error is that an invalid parameter value has been used but using the same parameters in inline printing results in the correct barcode printed.

    I really hope that there is a solution for using the PrintBarcode function with those two barcodes as all others that have been implemented are working without any problems.

    Best regards,

    Manfred Wilner

    Monday, December 11, 2017 7:29 PM

All replies

  • Hi ManFredWork1,

    Thank you for posting here.

    If you want to create QR code, you could download the source file from the code project for reference.


    For Barcode, you would like to chekc the followign link.


    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 12, 2017 2:15 AM
  • Hi Wendy,

    Thank you for your suggestions but I am not looking to implement a barcode scanner rather I have a POSPrinter implementation and the problem is in the Microsoft code supporting POS for .NET 1.14 not verifying the constant for QR and DataMatrix codes.

    I have implemented two new codes with the BarcodeSymbology.Other and Other+1 constant and can make the printer print the correct barcode only when using the Microsoft defined constant

    BarCodeSymbology.QRCode and


    it fails.

    So the question is why does the

    objPOSPrinter.PrintBarCode() function fail if used with the official QR and DataMatrix codes but doesn't fail with other barcode codes released before version 1.13 and doesn't fail with a custom code?

    Best regards,

    Manfred Wilner

    Tuesday, December 12, 2017 3:23 PM
  • @ManfredWork1,

    I am sorry to hear about your troubles printing QR Code and Datamatrix barcodes using POS for .NET 1.14. By any chance have you tried POS for .NET 1.14.1, which was released in August 2017?  

    Please provide additional details about the specific printer and service objects that you are using so that we can investigate your specific situation.

    Terry Warwick

    Friday, December 22, 2017 4:37 AM
  • The following cases are possible.

    - The service object you are using is POS for .NET native.
      That service object may not yet support those bar code printing, or some special procedures or parameters may be required.

      Please check the specification of the service object or contact the vendor.

    - When the service object being used is OPOS.
      If barcode data contains 0x00 or control code or data that can not be converted from Unicode to MBCS, printing may not be possible or different data may be printed.

      Please manipulate ILegacyControlObject.BinaryConversion before and after PrintBarCode so that the above data exactly passes to the OPOS service object.

    The service object is OPOS, and there is a possibility that there is a problem with Microsoft.PointOfService.
      If you use the debug version of common control object, you can record the details of the parameter when Microsoft.PointOfService calls the common control object, so you can check if it is correct.

    • Edited by Kunif3 Friday, January 5, 2018 5:30 AM
    Friday, January 5, 2018 5:29 AM
  • Hi Terry,

    To answer the first question I am indeed using POS for .NET 1.14.1 and have compiled all sources against this new version and updated the printer related function in the SO.

    That brings me to the second question, I am updating the OPOS driver for the Zebra printer families from POS for .NET 1.12 to the latest version.

    While doing this I discovered the above problem that is caused by the Microsoft owned components. So for now I have created a workaround in my SO to use the Other value instead the values for the Data Matrix and the QR barcode.

    Interesting enough is that the inline use of the barcode values of 203 and 204 are working just fine and only when used with the PrintBarcode function I am experiencing this issue.

    Best regards,

    Mandred Wilner

    Zebra Technologies

    Friday, January 12, 2018 9:08 PM
  • Hi Kunif3,

    I am currently using a native POS for .NET 1.14.1 SO and would like to approach the debugging path, if you could tell me where I can get the debug versions of Microsoft.PointOfService.

    Best regards,

    Manfred Wilner

    Friday, January 12, 2018 9:12 PM
  • Hi ManfredWork1,

    Since the debug version of Microsoft.PointOfService is only for internal use by Microsoft, I think that normal users can not use it.

    An alternative is to use the source code of the test application and device simulator in the SDK.

    - Implement the PrintBarCode method and associated property values in the printer device simulator to create a debug version

    - Set a breakpoint at the entrance of PrintBarCode method and execute debugging

    - Call PrintBarCode to print QR code and DataMatrix from test application

    - Check values of various parameters when the simulator is called

    You can see if the Microsoft.PointOfService runtime is doing something like changing parameters, not making method calls, and so on.

    Best Regards,


    Saturday, January 13, 2018 11:47 PM
  • Hi Kunif,

    Thanks for the reply, I tried this out and get the same results as in my own SO and really think it is a MS symbol issue that comes from the MS core Microsoft.PointOfService.

    Best regards,

    Manfred Wilner

    Monday, January 15, 2018 9:12 PM
  • Hi ManfredWork1,

    When I tried it, an exception occurred in the POS for.NET runtime.

    The location is below.
    Microsoft.PointOfService.BaseServiceObjects.PosPrinterBase.ValidateBarCodeSymbology (BarCodeSymbology symbology)

    Five barcodes added with UnifiedPOS ver 1.13 are exceptions with the above check.
    It seems that this function has not been updated.
    It will affect service objects created by inheriting PosPrinterBase.

    If you are able to issue a ServiceRequest to Microsoft, you should do it.

    Best Regards,


    Tuesday, January 16, 2018 11:25 AM
  • @ManfredWork1,

    Can you please provide the specific details of the PrintBarcode attributes and MapMode that you are using in contrast with the inline commands that you are using when you experience this issue?

    I believe that there is a difference in how UnifiedPOS defines the width of the barcode an how an inline ESC/POS command works.  One requires that you specify the width of the entire barcode and the other requires that you specify the width of the narrowest element within a barcode.

    Terry Warwick

    Friday, January 19, 2018 2:57 PM
  • @ManfredWork1,

    This issue is currently in our investigation backlog.  If this is blocking your progress, please help us understand the urgency of a fix, otherwise it sounds like you have a workaround.

    Terry Warwick

    Tuesday, February 20, 2018 11:54 PM