This is a migrated thread and some comments may be shown as answers.

Export Barcode image

1 Answer 76 Views
Barcode
This is a migrated thread and some comments may be shown as answers.
Sébastien
Top achievements
Rank 1
Sébastien asked on 04 Mar 2020, 12:38 PM

Hi,

I would like to export a barcode image.

Can I do that with RadBarcode ? Or is it just usable in xaml ? 

 

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 04 Mar 2020, 03:56 PM

Hi Sébastien,

The barcode itself is UI component, not an image. If you want to "export" it as an image you need to use the native platform's UI rendering features.

this will take anything you have on the screen and turn it into an image, encoded to png/jpg/ect according to what that native platform supports. This is not exclusive to the RadBarcode, ti will be anything you want from the rendered UI.

I have written a custom demo that shows how to achieve this, here's a quick link https://github.com/LanceMcCarthy/CustomXamarinDemos/tree/master/RenderImage 

Please pay close attention to the DependencyService classes in each native project. That logic is what actually creates the image byte[] and returns it to the Xamarin.Forms logic..

Regards,
Lance | Team Lead - US DevTools Support
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Barcode
Asked by
Sébastien
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or