Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Aug 26, 2024 6:47 am

word 公式转换后, 求积分符号,特别粗

这个公式转换后,用FromMathMLCode 产生的word文档也不对

billpeace
 
Posts: 5
Joined: Tue May 30, 2023 3:27 am

Tue Aug 27, 2024 2:21 am

您好,

感谢您的留言。我们测试使用FromMathMLCode将你附件中的MathMLCode转化为数学公式,发现效果跟你的截图不一样,为了我们进一步调查,请你提供转换前含公式的文档给我们,并告知我们你想转换的格式。您可以在此处上传或通过电子邮件([email protected])发送给我们. 提前感谢。

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Tue Aug 27, 2024 2:37 am

截图不一样 不是用 FromMathMLCode 转换出来的。

截图是,直接 load docx,save成pdf 以后的效果。

用 FromMathMLCode 转换出来docx,打开就不显示 公式的效果。

billpeace
 
Posts: 5
Joined: Tue May 30, 2023 3:27 am

Tue Aug 27, 2024 2:59 am

您好,

感谢您的留言。请你提供转换前包含公式的word文档给我们调查,方便我们转化成pdf文档进行查看。提前感谢。

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Tue Aug 27, 2024 5:33 am

您好,

感谢您的回复。你提到的在将word转为pdf文档后求积分符号变得特别粗的问题我没有复现,下面是我的测试截图,我也附上我的word 供你测试。如果你不是使用最新版本(Spire.Doc:12.8.12),建议可以使用最新版本再重试下。如果还有问题,请提供转换前包含公式的word文档给我们调查。提前感谢。

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Mon Oct 14, 2024 3:51 am

我使用了 最新版本,还是存在问题,请见 附近工程项目
1. docx 转换成 pdf,公式图片 明显变粗
2. docx,我先用 DocumentFormat.OpenXml 提出OMML2MML,然后用spire 插入word,生成的文档,公式是不对的?
能否看下,原因?
或提供一个方法,可以在新文档里面,插入公式?


I used the latest version, but there are still problems. Please see nearby projects
1. When converting docx to pdf, the formula image becomes obviously bolder
2. For docx, I first use DocumentFormat.OpenXml to generate OMML2MML, and then use spire to insert it into word. The formula of the generated document is incorrect?
Can you take a look at the reason?
Or provide a method to insert the formula in the new document?

billpeace
 
Posts: 5
Joined: Tue May 30, 2023 3:27 am

Mon Oct 14, 2024 9:04 am

您好,

感谢您的回复。
问题1:
我将你附件中测试Word文档转换为Pdf文档后,确实重现了你提到的求和符号“Σ”变粗的问题。我已将此问题记录在我们的bug跟踪系统中,编号为SPIREDOC-10869。
问题2:
从附件工程中获取的officeML值如下面代码所示,我在HTML文件中展示其的效果如下面截图所示。这和你附件中测试的Word文档中的公式不同,要实现你期望效果,请确保officeML值是否正确。
officeML的值:
Code: Select all
<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>f</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mrow><mml:msubsup><mml:mo stretchy="true">∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>∞</mml:mi></mml:mrow></mml:msubsup><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">cos</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfrac><mml:mrow><mml:mi>n</mml:mi><mml:mi>π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>L</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mrow><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>b</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfrac><mml:mrow><mml:mi>n</mml:mi><mml:mi>π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>L</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mrow></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:math>

另外,我们的产品除了支持添加MathML公式外,还支持类似下面这样添加Latex数学公式。

Code: Select all
officeMath.FromLatexMathCode("x^{2}+\\sqrt{x^{2}+1}=2");

Sincerely,
Amin
E-iceblue support team
Last edited by Amin.Gan on Wed Oct 16, 2024 8:47 am, edited 1 time in total.
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Wed Oct 16, 2024 8:44 am

https://mathjax.github.io/MathJax-demos ... chtml.html

这里输入 mml 转换以后 是正确的

billpeace
 
Posts: 5
Joined: Tue May 30, 2023 3:27 am

Wed Oct 16, 2024 9:53 am

您好,

感谢您的反馈。使用微软Word打开包含mml 的HTML文件效果也是和我之前的截图效果一样,不管怎样,我也将这个问题记录在我们的bug跟踪系统中,编号为SPIREDOC-10873。我们的开发团队将协助调查是否可以实现您的预期效果,如果一旦有任何更新,我会立即通知你的。

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Thu Dec 26, 2024 9:11 am

您好,

感谢您的耐心等待。我们刚才发布了Spire.Doc 12.12.12 hotfix,修复了使用FromMathMLCode方法插入公式不正确的问题,编号为SPIREDOC-10873。欢迎从以下链接下载并测试。

官方网站链接: https://www.e-iceblue.cn/Downloads/Spire-Doc-NET.html

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Return to Spire.Doc