Add PNG image to PDF

1 Answer 426 Views
PdfProcessing
Marc
Top achievements
Rank 1
Marc asked on 09 Aug 2022, 03:59 PM

Hi,

I'm trying to add a PNG image into a PDF file, but it doesn't work. I app crash when I reach the following instructions :

PdfFormatProvider provider = new PdfFormatProvider();
File.WriteAllBytes (path, provider.Export (document));

Adding a JPG image works fine. If I don't add the PNG, It works fine too.

I'm working with Telerik UI for Xamarin. How can I add this PNG ? It's a PNG with transparancy, does it matter ?

Thank you !

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 10 Aug 2022, 02:12 PM

Hello Marc,

When using the Net Standard version you need to specify the default ImagePropertiesResolver which handles the image conversion. Detailed information is available in the following article:  PdfProcessing - Images.

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
PdfProcessing
Asked by
Marc
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or