Spire.Doc for Java 14.5.3 がリリースされました。本バージョンでは、脚注または文末脚注の数を取得する機能、および「文書で使用されている文字のみを埋め込む」設定に対応しました。また、Word から PDF への変換時に発生していた書式の不一致や画像のぼやけの問題も修正されています。詳細は以下のとおりです。
変更内容一覧
| カテゴリー | ID | 説明 |
| 新機能 | SPIREDOC-11693 | 脚注または文末脚注の数を取得する機能を追加しました。
Document doc = new Document();
doc.loadFromFile(inputFile);
StringBuilder sb = new StringBuilder();
for (int n = 0; n < doc.getSections().getCount(); n++) {
Section s = doc.getSections().get(n);
for (int i = 0; i < s.getParagraphs().getCount(); i++) {
Paragraph para = s.getParagraphs().get(i);
for (int j = 0, cnt = para.getChildObjects().getCount(); j < cnt; j++) {
ParagraphBase pBase = (ParagraphBase) para.getChildObjects().get(j);
if (pBase instanceof Footnote) {
Footnote fn = (Footnote) pBase;
if (fn.getFootnoteType() == FootnoteType.Footnote) {
StringBuilder fnText = new StringBuilder();
for (int k = 0; k < fn.getTextBody().getParagraphs().getCount(); k++) {
fnText.append(fn.getTextBody().getParagraphs().get(k).getText());
}
sb.append("Footnote:"+ fnText.toString() + "\nFootnoteID:" + fn.getId() + "\n");
}
if (fn.getFootnoteType() == FootnoteType.Endnote) {
StringBuilder enText = new StringBuilder();
for (int k = 0; k < fn.getTextBody().getParagraphs().getCount(); k++) {
enText.append(fn.getTextBody().getParagraphs().get(k).getText());
}
sb.append("Endnote:"+ enText.toString() + "\nEndnoteID:" + fn.getId() + "\n");
}
}
}
}
} |
| 新機能 | SPIREDOC-11878 | 「文書で使用されている文字のみを埋め込む」設定に対応しました。
doc.setEmbedFontsInFile(true); doc.setSaveSubsetFonts(true); |
| 不具合修正 | SPIREDOC-11829 | Word から PDF への変換時に書式が一致しない問題を修正しました。 |
| 不具合修正 | SPIREDOC-11899 | Word から PDF への変換時に画像がぼやける問題を修正しました。 |
Spire.Doc for Java 14.5.3 のダウンロードはこちら:






