Telerik Forums
Telerik Document Processing Forum
1 answer
83 views

I'm creating a spreadsheet Workbook, then exporting it to PDF. Each cell I write has a custom style where the FontSize is being set to 9 (and I'm also setting up fills and font effects, like bold).

When I get through writing the data to the Worksheet(s) in the Workbook, I then call AutoFitWidth on the Columns that have data.

Finally, I use the PdfFormatProvider to write the entire Workbook to a PDF file.

My problem is that text items in the cells are being clipped, even when there is room to fit them after calling AutoFitWidth.

For example:

It seems to be worse on strings with all caps. Sometimes it's just half a letter, other times it's multiple letters (the ATMOSPHERICCORR is supposed to be ATMOSPHERICCORROSION).

Here's another export in a different format:

As you can see, there's two problems based on calculating the required width. First is that AutoFitWidth is not giving enough space (mostly in the second example), but as you can see in the first example, even when there is enough horizontal space, it's still clipping off the text area within the cell.

Is the estimation assuming no caps, or is the font size/font family throwing it off (9pt)? Or am I missing something where I can force it to make more space?

Dimitar
Telerik team
 answered on 29 May 2023
1 answer
209 views

Hi Telerik,

I saw there is a property to exclude the hidden sheets here and here.

But, when I tried to see it in the code, I didn't find it.

I'm using version 2019.3.1021.

Is it not available on my version?

If yes, is there any workaround?

Thank you.

 

Svilen
Telerik team
 answered on 14 Mar 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?