I have attached a test class that I have been using. I have been building this on osx using:
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {font-variant-ligatures: no-common-ligatures}
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
I then sftp it to a t2 medium AWS instance:
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {font-variant-ligatures: no-common-ligatures}
Linux ip-10-42-10-55 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
The instance is running the following java version:
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {font-variant-ligatures: no-common-ligatures}
Java HotSpot™ 64-Bit Server VM (build 25.45-b02, mixed mode)
I run test on the aws instance and then sftp the out.pdf file back so I can view it on osx.
If you run the following command you will see that despite setting autoFitColumns, the cells all show hashes.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {font-variant-ligatures: no-common-ligatures}
java -cp aspose-cells-16.10.6.jar:. AsposeTest
The following command will change the default font for the sheet to Arial. This seems to work for my test but I don't know if it is a safe approach that will work for all spreadsheets.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {font-variant-ligatures: no-common-ligatures}
java -DchangeFont=true -cp aspose-cells-16.10.6.jar:. AsposeTest
When I run the test I get the following output:
changeFont = true
default font style was Calibri
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ C4 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ C5 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ D5 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ E5 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ F5 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ G5 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ B6 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C6 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C6 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ D6 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ E6 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ F6 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ G6 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ B7 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C7 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C7 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ D7 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ E7 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ F7 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ G7 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ B8 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C8 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C8 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ D8 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ E8 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ F8 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ G8 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ B9 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C9 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C9 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ D9 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ E9 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ F9 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ G9 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ B10 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C10 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C10 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ D10 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ E10 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ F10 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ G10 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Bold ] has been substituted in Cell [ B11 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C11 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ C11 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ D11 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ E11 ] in Sheet [ Sheet1 ].
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ F11 ] in Sheet [ Sheet1 ].
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {font-variant-ligatures: no-common-ligatures}
Font substitution: Font [ Calibri; Regular ] has been substituted in Cell [ G11 ] in Sheet [ Sheet1 ].
Thanks,
James