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.

Changing the quality of the images in a pdf.

Thread ID:

Created:

Updated:

Platform:

Replies:

106756 Jan 24,2013 01:37 AM Mar 22,2013 08:11 AM WPF 3
loading
Tags: PDF
Simon
Asked On January 24, 2013 01:37 AM

I'm trying to shrink the size of a pdf that contains a lot of bitmaps with the following code:


        foreach (var page in pdf.Pages.Cast<PdfPage>())
                {                   
                    foreach (var imageInfo in page.ImagesInfo)
                    {
                        var image = imageInfo.Image;
                        var pdfBitmap = new PdfBitmap(image);
                        pdfBitmap.Quality = 80;
                        page.ReplaceImage(imageInfo.Index, pdfBitmap);
                    }
                }

But this doesn't seem to have any effect.

George Livingston [Syncfusion]
Replied On January 28, 2013 12:04 AM

Hi Simon,

Thank you for using Syncfusion products.

We are not able to reproduce the issue. Herewith I have attached the sample with which we tried to reproduce the issue. Please try this and let us know if you have question. If you still face the problem, kindly open an incident in Direct-Trac. Please find the sample available in the link below,

ReplaceImageSample.zip

Regards,

George


System Administrator
Replied On March 19, 2013 04:03 AM

When I try to do this I lose the transparency from my images.
How can I reduce the image quality and keep the image transparency?

It also only appears to work on the first image. Only one image per page is replaced with a reduced quality image.

Thanks.



Praveenkumar H [Syncfusion]
Replied On March 22, 2013 08:11 AM

Hi Leo,

Thank you for your update,

We are able to reproduce the issue "While replacing the image Only one image per page is replaced with a reduced quality image". Please open an incident in Direct-Trac to resolve this issue.

Please let us know if you have any concern,

With Regards,
Praveen

CONFIRMATION

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.

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.

;