Save QR Code as Image

9 posts, 0 answers
  1. Paul
    Paul avatar
    114 posts
    Member since:
    May 2009

    Posted 31 Jul 2012 Link to this post

    Hi,
        Is there any way to save a RadBarcodeQR to binary or image? Then I could use it on a report until telerik reports support QR codes.

    Thanks
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 02 Aug 2012 Link to this post

    Hi,

    The following example:

    http://demos.telerik.com/silverlight/#Barcode/Configurator

    demonstrates one such option. I hope it gets you started properly.

    Regards,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Sergiy
    Sergiy avatar
    38 posts
    Member since:
    Jan 2012

    Posted 31 May 2013 Link to this post

    It's doesn't work on code-behind. Why?
    If I am using xaml, it works.
    See my new thread , please
  4. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 04 Jun 2013 Link to this post

    Hello,

    As mentioned in the other thread, in order to make sure that we are on the same page, please open a formal support ticket and send us the problematic code, which demonstrates your approach, along with the unwanted behavior. We will review it locally, and advise you further.

    Regards,
    Yavor
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. William
    William avatar
    3 posts
    Member since:
    Jan 2015

    Posted 13 Nov 2018 Link to this post

    Any update to this topic?  I too am trying to change the .Text property of the control in code behind to update the resulting image and then save to a byte stream for displaying in a report.  It seams that by changing the .Text property does not fire off the event that updates the resulting QR code.  I also tried "Dispatcher.Invoke((Action)(() => qrValue = rbcSalesOrder.Text));" to see if the control would update the QR code but no luck.
  6. William
    William avatar
    3 posts
    Member since:
    Jan 2015

    Posted 13 Nov 2018 in reply to William Link to this post

    Got this to work now by adding the following after setting the .Text and before saving to a byte array:

                    Dispatcher.Invoke((Action)(() => qrValue = rbcSalesOrder.Text));      
                    Dispatcher.Invoke(new Action(() => Thread.Sleep(1000)), DispatcherPriority.Background);

  7. Dinko
    Admin
    Dinko avatar
    899 posts

    Posted 16 Nov 2018 Link to this post

    Hi William,

    I have tested this behavior on my side but wasn't able to reproduce it. What I have tried is to change the Text property run time on MouseDoubleClick event. The RadBarcodeQR is updated after that. Can you elaborate more on your scenario? Also, is the RadBarcodeQR bound to a custom property in your application? 

    Regards,
    Dinko
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  8. William
    William avatar
    3 posts
    Member since:
    Jan 2015

    Posted 11 Dec 2018 in reply to Dinko Link to this post

    With my application I have one RadBarcodeQR being displayed. I am creating a report that needs to print multiple unique QR images.  These are later scanned by another application used to record production data.  The value scanned allows us to track production data based on that scanned value.  At generation time, the user can select to print one or any number of unique QR codes.  I update the Text of the RadBarcodeQR in the code-behind.  Since I only have one RadBarcodeQR being displayed I have to use my solution above in order for the UI to update, thus updating the RadBarcodeQR and then generate an image for that value for the report.

    If the method to update the graphical part of the RadBarcodeQR (after Text change) was exposed, I would think I could use it instead of using the Dispatcher.Invoke.

    Hope that helps explain my situation.

  9. Dinko
    Admin
    Dinko avatar
    899 posts

    Posted 14 Dec 2018 Link to this post

    Hello William,

    Thank you for elaborating your scenario. Still I not able to reproduce this behavior. I am attaching a sample project which I used to test your case. Can you take a look at this project and let me know if my approach of changing the Text of the barcode is different from yours? Maybe I am missing an additional step from your implementation.

    As a side note, I am happy to hear that you have a workaround which you can use in your application so you can continue its development.

    Regards,
    Dinko
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top