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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to convert JPEG image from PNG image and draw those JPEG image into PDF document

At present, we do not have native support for drawing PNG image on PDF in Xamarin forms platform. So, we can convert the PNG image to JPEG and drawing the JPEG image into PDF document in Xamarin platform.  We have achieved the PNG image to JPEG conversion by using the Dependency service. We have implemented the PNG to JPEG conversion in Xamarin.Android, Xamarin.IOS and Xamarin.UWP. Please find the sample and code snippet below,

 

Convert PNG to JPEG using Xamarin.Android :

Convert the PNG image to JPEG in Xamarin.Android by using below code snippet.

C#

 

Convert PNG to JPEG using Xamarin.IOS :

Convert the PNG image to JPEG in Xamarin.IOS by using below code snippet.

C#

 

Convert PNG to JPEG using Xamarin.UWP :

Convert the PNG image to JPEG in Xamarin.UWP by using below code snippet.

C#

 

Draw the JPEG image into PDF document:

Draw the JPEG image into PDF document can be shown in the below code snippet.

C#

 

Sample link:

http://www.syncfusion.com/downloads/support/directtrac/general/ze/ImageDrawing-1680216731

 

Article ID: Published Date: Last Revised Date: Platform: Control:
7918 08/03/2017 08/03/2017 Xamarin.Forms PDF
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon