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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change PDF Image format

Thread ID:





120785 Oct 14,2015 06:16 PM UTC Oct 16,2015 11:11 AM UTC UWP 3
Tags: Pdf
Evan Stoll
Asked On October 14, 2015 06:16 PM UTC

So I'm using Syncfusion Controls for UWP XAML, and I'm trying to insert JPEGs into a PDF I'm creating, but PdfImage seems to always return bitmaps.  Or at least images with bitmap-like file sizes.
Is there any way to ensure the images being inserted are of JPEG size? The images I'm inputting are JPEGs to begin with.
I'd be fine with bitmaps if I wasn't making PDFs of manga (Japanese comic books), i.e. the size per manga right now ranges from 50-150MB.

It's not a working sample, but here's what I'm using right now.
I'd ask about the memory leak but that's probably better fitted for SO.

Thanks in advance.

Abirami Selvan [Syncfusion]
Replied On October 15, 2015 12:37 PM UTC

Hi Evan,
Thank you for contacting Syncfusion support.
We are unable to reproduce the issue getting memory raises when draw the JPEG image into PDF document. We have attached the sample and output document which we have tried to reproduce the issue.
Please refer the following link:
Could you please provide us the image and output PDF document which you have reproduced the issue. It will help us to proceed further analysis in this.

Evan Stoll
Replied On October 15, 2015 09:18 PM UTC

Well, I refactored some of the methods and the memory leak ended up being the cause. Lesson learned: using statements are your friends.

To be a little more specific, I just created a file as a destination for the PDF, then called

using (Stream s = new FileStream(/*string*/>f.Path, FileMode.OpenOrCreate)) { await Task.Run(() => SaveAsPdf(/*StorageFile*/f, /*Manga*/m)); }

Various other things needed to be moved around, but leaving the FileStream open ended up being the problem.

I guess the memory leak wasn't unrelated at all.

Praveenkumar H [Syncfusion]
Replied On October 16, 2015 11:11 AM UTC

Hi Evan,

We are happy to know that the memory issue fixed in your side.

Please share us documents and screenshots if you face any issues further, we will happy to assist you.

With Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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