Aspose 學習記錄
※,有個和aspose類似的產品 spire,待研究
<repositories>
<repository>
<id>com.e-iceblue</id>
<url>https://repo.e-iceblue.cn/repository/maven-public/</url>
</repository>
</repositories><dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.presentation.free</artifactId>
<version>3.9.0</version>
</dependency>
※,關于word中的LaTeX和域公式的一些說明
- 總結: `Alt + F9(Shift + F9)`是用于切換 域代碼和域顯示的,`Alt + \`是用于切換LaTeX代碼和LaTeX顯示的。
- 域公式的語法和LaTeX的語法不一樣。比如三分之二的域公式寫法為:·\eq \f(2,3)·, 三分之二的LaTeX寫法是·\frac{2}{3}·
- word中書寫域公式的方法:使用快捷鍵ctrl+F9即可在word中插入一個域(word中的所謂域通俗講就是一個字段,一般是作為占位符的一個預定義字段), 域以一對帶底色的花括號表示,內有光標提示鍵入內容。鍵入【\eq 】(注意\eq后有個空格)表示這是一個公式(equation)域。輸入域公式代碼后按 shift + F9可以將域公式代碼轉換為正常顯示的公式。shift + F9是將光標所在的單個域(包括普通域和域公式)在域公式代碼和正常顯示的公式之間切換。Alt + F9是將word中的所有的域(包括普通域和域公式)切換。
- word中LaTeX公式的寫法:普通模式下鍵入兩個$符號,然后在兩個$符號之間書寫LaTeX,如`$\frac{2}{3}$`,然后使用快捷鍵` alt + \`在LaTeX代碼和正常顯示之間切換。注意:alt + \ 只會轉換光標所在的LaTeX代碼,如果想轉換所有可以選中所有的LaTeX代碼然后按alt + \ 即可。
- 輸入的LaTeX代碼轉換為正常顯示的公式后,可以使用mathtype插件打開。
- LaTeX公式切換為正常顯示后,再使用Shift + F9轉換為域的話,會顯示為·{ EMBED Equation DSMT4 }·,右鍵->equation對象->edit 則會打開mathtype編輯器。
※,
1. https://www.evge[還有敏感詞...]t.com/article/2020/7/7/36853.html (evge t 敏感詞...)
1.doc.MailMerge.DeleteFields(); // 刪除未使用的空白域
1.
// 移除某個 mergeField Field theField = null; for (Field field : document.getRange().getFields()) { if (field.getType()==59 && "highestScore".equals(((FieldMergeField) field).getFieldName())) { theField = field; } } if (null != theField) { theField.remove(); }
1. DocumentBuilder 類
- DocumentBuilder documentBuilder = new DocumentBuilder(new Document("path/to/test.docx")); // 此時 指針 位置位于文檔的開頭
- documentBuilder.insertDocument(new Document("path/to/ test_1.docx"), ImportFormatMode.USE_DESTINATION_STYLES); // insertDocument()方法會將指針置于test_1.docx文件的最后
- documentBuilder.insertDocument(new Document("path/to/ test_2.docx"), ImportFormatMode.USE_DESTINATION_STYLES);// 以上三行代碼生成的文檔順序是:test_1-----test_2-----test
1.
1.
1.
1.
浙公網安備 33010602011771號