We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Syncfusion barcode into RDLC report


Hi
I am using Syncfusion SfBarcode control in my UWP application.And for my reporting purpose ,
i need to convert this bar code as image or byte array to show in my RDLC  report,unfortunately
RDLC doesn't support direct xaml binding.
Is it possible to convert Syncfusion bar code into jpeg format or byte array in UWP  10.
Thanks in advance.


3 Replies

CM Chinnu Muniyappan Syncfusion Team June 20, 2016 12:36 PM UTC

Hi Krishna, 

Thank you for contacting Syncfusion support. 

Currently we don’t have support for exporting Barcode as image in UWP platform. But as a workaround we can achieve this by drawing Barcode in PDF and then exporting as Image. Please find the workaround sample in the below link. 

Sample link: 

Note: 
1.       Here we use PdfViewer to display the PDF and then convert this to PDF.  
2.       To achieve this workaround, we need to use the below list of assemblies. 
Required Assemblies: 
Syncfusion.Pdf.UWP.dll 
Syncfusion.SfPdfViewer.UWP.dll 
Syncfusion.SfInput.UWP.dll 

We have logged a feature request for converting Barcode to Image, we will implement this in any of our upcoming release.  

Regards, 
Chinnu 



TA Thomas Albert June 24, 2016 06:30 AM UTC

Hi Krishna,

I think you can solve your problem with the following code:

RenderTargetBitmap rtb = new RenderTargetBitmap();
await rtb.RenderAsync(YourSfBarCodeControl, 1000, 1000);
var x = await rtb.GetPixelsAsync();
byte[] bytes = x.ToArray();

Any visible UIElement can be rendered as a bitmap and this bitmap can be converted into a byte array.

Hope this helps

Thomas


KC Karthikeyan Chandrasekar Syncfusion Team June 27, 2016 09:12 AM UTC

Hi Thomas, 
Thanks for your update. 

Regards, 
Karthikeyan.C 


Loader.
Up arrow icon