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

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.

    https://www.codeproject.com/Articles/34473/Controlling-a-Barcode-Reader-with-POS-for-NET

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

    https://msdn.microsoft.com/en-us/library/dn792060(v=winembedded.81).aspx

    Best Regards,

    Wendy


    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
    Moderator
  • 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

    BarCodeSymbology.DataMatrix

    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
    Microsoft 

    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,

    Kunif3

    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,

    Kunif3

    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
    Microsoft 

    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
    Microsoft

    Tuesday, February 20, 2018 11:54 PM