none
Why ZXing.net can not generate RSS_14 code? RRS feed

  • Question

  • I am using a famous open-source image processing library Zxing.net(https://www.nuget.org/packages/ZXing.Net/) to generate the barcode.

    Everything is ok but generate RSS_14 code as below:

    private void GenerateCode()
    {
    BarcodeWriter writer = new BarcodeWriter();
                writer.Format = writer.Format = BarcodeFormat.RSS_14;;
                Options.Height = this.Height;
                Options.Width = this.Width;            
    ZXing.Common.EncodingOptions options = new ZXing.Common.EncodingOptions(); 
    options.Margin = 0;
    options.PureBarcode =true;
                writer.Options = options;            
                image.ImageSource = ConvertBitmap(writer.Write(Source));
    }

     private BitmapImage ConvertBitmap(System.Drawing.Bitmap bitmap)
            {
                MemoryStream ms = new MemoryStream();
                bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
                BitmapImage image = new BitmapImage();
                image.BeginInit();
                ms.Seek(0, SeekOrigin.Begin);
                image.StreamSource = ms;
                image.EndInit();

                return image;
            }

    The Visual Studio reports an error that:

    System.ArgumentException: 'No encoder available for format RSS_14'

    Is there any problem with the ZXing.net or my code?

    Would you please help me? Thank you.

    Wednesday, May 15, 2019 6:57 AM

Answers

  • Hi mywatermelon,

    Thank you for posting here.

    For your question, the encoder do not support the format of RSS-14. You could try other format to generate barcode.

    For more details about the supporting format, you could refer to the link below. 

    https://github.com/micjahn/ZXing.Net

    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.

    • Marked as answer by mywatermelon Wednesday, May 15, 2019 7:46 AM
    Wednesday, May 15, 2019 7:16 AM
    Moderator

All replies

  • Hi mywatermelon,

    Thank you for posting here.

    For your question, the encoder do not support the format of RSS-14. You could try other format to generate barcode.

    For more details about the supporting format, you could refer to the link below. 

    https://github.com/micjahn/ZXing.Net

    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.

    • Marked as answer by mywatermelon Wednesday, May 15, 2019 7:46 AM
    Wednesday, May 15, 2019 7:16 AM
    Moderator
  • Hi mywatermelon,

    Thank you for posting here.

    For your question, the encoder do not support the format of RSS-14. You could try other format to generate barcode.

    For more details about the supporting format, you could refer to the link below. 

    https://github.com/micjahn/ZXing.Net

    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.

    Well, I tried what you said and it is right. Thank you.

    Wednesday, May 15, 2019 7:40 AM