From 245d9507a15f20e3db331ab5ec5307bef5223ba9 Mon Sep 17 00:00:00 2001 From: VinothSF5015 Date: Thu, 4 Jun 2026 17:12:47 +0530 Subject: [PATCH 1/2] Content Added --- ...hen-workbook-and-cell-font-sizes-differ.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Document-Processing/Excel/Excel-Library/NET/faqs/why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md b/Document-Processing/Excel/Excel-Library/NET/faqs/why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md new file mode 100644 index 0000000000..61d9f927a8 --- /dev/null +++ b/Document-Processing/Excel/Excel-Library/NET/faqs/why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md @@ -0,0 +1,26 @@ +--- +title: Why cropping occurs with differing font sizes? | Syncfusion +description: The page explains why picture cropping occurs when the workbook standard font size differs from cell text font size, and how to resolve it using AutofitRows or consistent font sizes. +platform: document-processing +control: XlsIO +documentation: UG +--- + +# Why does cropping occur when workbook and cell font sizes differ? + +Cropping occurs because the picture height is calculated based on the stored height of the first row. When the workbook's standard font size is set to 9, Excel typically uses a row height of 14 pixels. However, if the cell text is formatted with a larger font size (for example, `worksheet.Range[row, column].CellStyle.Font.Size = 11`), the actual text requires more vertical space (approximately 17 pixels). + +This mismatch causes the picture height to be smaller than the text block, resulting in clipping. As content spans across pages, this misalignment accumulates, making the cropping more noticeable on subsequent pages. + +In contrast, when the workbook standard font size is set to 11, the default row height increases to 20 pixels. This aligns better with the text height, ensuring the calculated picture height (for example, 60 pixels) matches the content, thereby preventing cropping. + +When both the workbook standard font size and the cell font size are set to same, the row height and text height remain consistent. As a result, the picture height calculation aligns correctly, and no cropping occurs even without using Autofit. + +## Resolution + +To avoid cropping, ensure that the row height and text height are synchronized before sizing images. This can be achieved by: + +* Calling `AutofitRows()` after inserting text so that row heights are recalculated automatically, or +* Using consistent font sizes for both the workbook standard font and the cell text + +By maintaining this alignment, the picture height calculation matches the text height, and the cropping issue is resolved consistently across all pages. From ca19b38cb99d4ec3876d35618558b27219f55c85 Mon Sep 17 00:00:00 2001 From: VinothSF5015 Date: Thu, 4 Jun 2026 17:21:48 +0530 Subject: [PATCH 2/2] Update why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md --- ...s-cropping-occur-when-workbook-and-cell-font-sizes-differ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md b/Document-Processing/Excel/Excel-Library/NET/faqs/why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md index 61d9f927a8..b371abc9ed 100644 --- a/Document-Processing/Excel/Excel-Library/NET/faqs/why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md +++ b/Document-Processing/Excel/Excel-Library/NET/faqs/why-does-cropping-occur-when-workbook-and-cell-font-sizes-differ.md @@ -1,6 +1,6 @@ --- title: Why cropping occurs with differing font sizes? | Syncfusion -description: The page explains why picture cropping occurs when the workbook standard font size differs from cell text font size, and how to resolve it using AutofitRows or consistent font sizes. +description: This page explains why picture cropping occurs when workbook and cell font sizes differ, and how to resolve it using AutofitRows or consistent font settings. platform: document-processing control: XlsIO documentation: UG