Aspose.cells for java 单元格内缩放图片比例失真

@yuantao312,

请在Aspose.Purchase部分发布查询,我们的销售人员会帮助您更好。

正如我们所提到的,行的高度和列的宽度在不同地区会有所不同。 请删除小字体。
Home==》Cell Styles==》right click normal Style==》modify==》format==》select Arial( or the font without brackets)

此外,我们将提供Font.SchemeType属性以支持设置字体的方案。

所用Excel为Excel 2013,已在Excel中将默认字体设置为Arial,但是在新建Excel时,默认字体仍为宋体。生成excel时,将原模板中的字体修改成了Arial。在生成过程中,图片仍有失真的情况。并且失真程度随着设定的压缩比增大而增大。
p1.png (22.8 KB)
字体:Arial

p2.png (18.2 KB)

设置为20的失真情况

p3.png (33.9 KB)

设置为50的失真情况

p5.png (72.8 KB)

两组图片均设置为50,不同图片的失真比例也不尽相同。

excel、图片 和 代码见附件:
0615.zip (7.6 KB)

Resim 10a.png (18.4 KB)
Resim 15.png (94.6 KB)

set.png (31.2 KB)
设置默认字体,如图

style.getFont().setSchemeType(FontSchemeType.NONE);
我们用最新的jar包18.5,没有这个setSchemeType方法。

@daichao1225

我们能够观察到这个问题,如以下屏幕截图所示。 我们会研究并修复它。 有一次,我们会为你提供一些消息,我们会尽快更新你的消息。

Console Output

88
14.25
Arial
true
Arial
50,50
75
true
false
50,50

Screenshot:

@daichao1225

1 - 请在MS Excel中设置默认样式,如下所示:

主页>单元格样式>右键单击普通样式>修改>格式>选择Arial(或不带括号的字体)。 然后执行你的代码,它会产生正确的结果。 请参阅下面的屏幕截图以获取更多帮助。

2 - 您在set.png中的设置显示您只在具有特定区域的机器中设置字体名称,如果更改了区域设置,则会得到不同的字体。


English Translation:

1 - Please set the default style in MS Excel as the following:

Home > Cell Styles > Right click Normal Style > Modify > Format > Select Arial (or the font without brackets). And then execute your code, it will generate correct results. Please see the screenshot below for more help.

2 - Your setting in the set.png shows that you only set the font name in your machine with specific region, if you change the region setting, you will get different font.

Screenshot: