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

Image in Pdf document

Thread ID:





121551 Dec 29,2015 02:17 PM UTC Dec 31,2015 11:07 AM UTC Windows Forms 3
Tags: PDF
Asked On December 29, 2015 02:17 PM UTC

I have a large .tif image 20000x15000 - (24bit RGB, no compression) that I can successfully insert into a PDF.
However, the pdf file is always compressed even though I write in code:"PdfCompressionLevel.None".
My code:

            document.ColorSpace = PdfColorSpace.RGB;
            document.Compression = PdfCompressionLevel.None;
            document.FileStructure.Version = PdfVersion.Version1_6;
            document.DocumentInformation.Author = "TW";

            PdfSection section = document.Sections.Add();

            PdfBitmap image = new PdfBitmap(@"D:\GM_1404_2015_A_PD.tif");
            image.Quality = 100;
            image.ActiveFrame = 0;
            section.PageSettings.Width = image.PhysicalDimension.Width;
            section.PageSettings.Height = image.PhysicalDimension.Height;
            section.PageSettings.Margins.All = 0;
            section.PageSettings.Orientation = PdfPageOrientation.Landscape;

            PdfPage page = section.Pages.Add();

Any suggestions?


Praveenkumar H [Syncfusion]
Replied On December 30, 2015 04:57 AM UTC

Hi Tobias,

Thank you for using syncfusion products,

Can you please send us your tiff image, so we will investigate and provide you the proper details in this.

With Regards,

Replied On December 30, 2015 10:43 AM UTC

Thank you for your quick reply,

 I have attached the image you requested this email (image_in.tif).
This is the sample of the original image.

 The file image_in.tif is the original file.
 The file image_in.pdf is the pdf I get as result using C# code.
 The file image_in_photoshop.pdf after using Photoshop. 
Both pdf files I get with "compress none" option.

 Thank you for your time,

Attachment: Image_in_c196780b.zip

Praveenkumar H [Syncfusion]
Replied On December 31, 2015 11:07 AM UTC

Hi Tobias,

Thank you for your update,

We do compression option only for content of the PDF document, so by default we are compressing the image when drawing in to the PDF document. So that  “document.Compression = PdfCompressionLevel.None;” doesn’t make any changes in the image compression. if you want compress the image further please refer the below UG documentation link.

Please let us know if you need further assistance.

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.

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