[]
Gets the best shrink-to-fit font size of the upper-left cell.
public double GetShrinkToFitFontSize(IRange range, PdfSaveOptions options)
Public Function GetShrinkToFitFontSize(range As IRange, options As PdfSaveOptions) As Double
| Type | Name | Description |
|---|---|---|
| IRange | range | The range to be printed. |
| PdfSaveOptions | options | Options for saving pdf file. |
| Type | Description |
|---|---|
| double | The font size to apply for shrinking text to fit within the range. |
worksheet.Range["A1"].Value = "Quarterly revenue summary";
worksheet.Range["A1"].ColumnWidth = 8;
worksheet.Range["A1"].ShrinkToFit = true;
PdfSaveOptions options = new PdfSaveOptions();
PrintManager printManager = new PrintManager();
double fontSize = printManager.GetShrinkToFitFontSize(worksheet.Range["A1"], options);