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

Image falls out of cell on print when using FitToPagesTall as page size increases

Thread ID:





95943 Aug 11,2010 01:44 PM UTC Aug 12,2010 09:53 AM UTC ASP.NET Web Forms (Classic) 2
Tags: XlsIO
Bala Vennelaganti
Asked On August 11, 2010 01:44 PM UTC

My application generates a spreadsheet with the each product image and its details in a table of 10 rows and there is a row space after every 10 rows.

The issue I am facing is during print preview or print, the images is going out of the cell either up or down and as the page size increases. Normal view, the image is in the cell and no issues. I think it is something to do with the FitToPagesTall option which invokes the Scaling Factor and guess that the image is not resized appropriately and wonder if there is a way to fit the image to cell while using FitToPagesTall option.

If you have a code to scale the image size by percentage, it would be helpful. I use pixels currently.

Based on the number of product types the page size increases. Here is a just an example code that I use to fit to number of pages based on number of product types.

sheet.SetRowHeightInPixels(row, 100);
image = new System.Drawing.Bitmap(OriginalImage, 100, 100);

IPictureShape picture = sheet.Pictures.AddPicture(row, column, image, 80, 80);
sheet.SetRowHeightInPixels(row, image.Height);
picture.Left = picture.Left + ((100- picture.Width) / 2);
picture.Top = picture.Top + ((100- picture.Height) / 2);
picture.IsSizeWithCell = true;
sheet.PageSetup.FitToPagesTall = 10; //hard coded for demo
sheet.PageSetup.FitToPagesWide = 1;

I appreciate your help. I am not able to attach the excel file as it is confidential. If you absolutely need, I might have to write a small app and send it across your way.

I appreciate your quick response as we need to fix the bug immediately.


Bala Vennelaganti
Replied On August 11, 2010 02:59 PM UTC

Here is the Excel file and sample code inside the zip folder.

Please note that as you move down to the very end of the document in PRINT PREVIEW (NOT NORMAL VIEW), the image goes up. In the real application, it goes up or down which blocks the other details of the items.



Geetha M [Syncfusion]
Replied On August 12, 2010 09:53 AM UTC

Hi Bala,

Thank you for the details.

I was able to reproduce the problem. Could you please create a new incident in direct-trac so that we can further update you with the details of the Image problem?



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