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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to reduce the file size when drawing the TIFF image into PDF document ?

Platform: WinForms |
Control: PDF

How to reduce the file size when drawing the TIFF image into PDF document?

To reduce the file size when drawing the TIFF image (which contains large no of frames) into PDF document, we can save each frame to Jpeg format and then draw the image into PDF document.

Please refer to the below code example how to draw the TIFF image into PDF document:


//Create a PDF document
Syncfusion.Pdf.PdfDocument document = new Syncfusion.Pdf.PdfDocument();
//Load the image
using (System.Drawing.Image imageFile = System.Drawing.Image.FromFile("../../Data/image.tiff"))
FrameDimension frameDimensions = new FrameDimension(
//Get frame count
int frameNumber = imageFile.GetFrameCount(frameDimensions);
for (int frame = 0; frame < frameNumber; frame++)
// Selects one frame at a time and save as Jpeg.
imageFile.SelectActiveFrame(frameDimensions, frame);
MemoryStream ms = new MemoryStream();
//save the frame as Jpeg image
using (Bitmap bmp = new Bitmap(imageFile))
ImageCodecInfo encoderInfo = this.GetEncoderInfo("image/jpeg");
EncoderParameters encoderParams = new EncoderParameters(1);
encoderParams.Param[0] = new EncoderParameter(Encoder.Quality, 50L);
bmp.Save(ms, encoderInfo, encoderParams);
ms.Position = 0;
//Load the Jpeg image
PdfBitmap image = new PdfBitmap(ms);
//Add the page
Syncfusion.Pdf.PdfPage page = document.Pages.Add();
//Create a PDF graphics
PdfGraphics g = page.Graphics;
//Draw the image into PDF page
g.DrawImage(image, new RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height));
//Dispose the memory
// Save and close the document.


Sample Link:


2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile