This can be used with the getMinimumFont and setMinimumFont methods.
The getEllipsis() and the setEllipsis() methods of the IShrinkToFitSettings interface can be used to get or set the omitted string if the wrapped text is not fully displayed.
The getMinimumFont() and the setMinimumFont() methods of the IShrinkToFitSettings interface can be used to get or set the minimum font size while enabling the shrink to fit feature.
The getCanShrinkToFitWrappedText() and setCanShrinkToFitWrappedText() methods of the IShrinkToFitSettings interface can be used to get or set whether to apply the shrink to fit feature on the wrapped text. If the value is true, the font size of the wrapped text may be reduced so that the wrapped text can be fully displayed.
In order to get or set the settings about enabling the shrink to fit feature on the wrapped text, you can use the the getShrinkToFitSettings() method of the PdfSaveOptions class.
The disadvantage of this method is that it makes sense only when the text is only slightly larger than the column width. In the new window, select Shrink to fit and press the OK button.
#FIT TEXT IN EXCEL CELL PDF#
If you're exporting your Excel files to a pdf file or stream, the PdfSaveOptions class can be used to configure the save settings. To use this method, select the cell, then go to HOME > Alignment and click the little square in the lower right corner.
The following points should be kept in mind while working with the shrink to fit feature : Also, this feature can be used when users don't want to opt for Auto fit row height and column width option to adjust the column width and row height as per their preferred worksheet layout. The Shrink to Fit feature implemented with wrapped text is useful especially when you need to deal with spreadsheets possessing tightly constrained layouts with vertical spaces and wrapped text. GcExcel Java allows users to apply the shrink to fit feature in a cell along with the wrapped text. This feature reduces the font size of the text automatically so that it fits inside the cells of the spreadsheet without wrapping.