Hi,
When we generate a docx from JATS XML and convert to PDF.
- When generating docx: the labels of footnote at the bottom of page in the target docx are missing, while the labels on the context are added correctly.
Our code:
Paragraph paragraph = new Paragraph(docx);
Run runp = new Run(document);
runp.setText("accounting for about 75% of membranous nephropathy (MN) cases");
paragraph.appendChild(runp);
Footnote footnote = new Footnote(docx, FootnoteType.FOOTNOTE);
footnote.getFont().setBold(false);
footnote.getFont().setSuperscript(true);
footnote.isAuto(true);
paragraph.appendChild(footnote);
Paragraph para = new Paragraph(docx);
Run run = new Run(document);
run.setText("Renal functions were stable.");
para.appendChild(run);
footnote.appendChild(para);
Run runp1 = new Run(document);
runp1.setText("About 20%-30% IMN patients");
paragraph.appendChild(runp1);
The attached is the sample.
EN-9-19.docx (747.2 KB)
EN-9-19.pdf (975.4 KB)
- When convert to PDF, the labels of footnote both on context and the bottom of page are all missing,
Here is our code:
com.aspose.words.Document doc;
try
{
File file1 = new File(pdfPath + "\\EN-9-19.docx");
String path = pdfPath + "\\EN-9-19.pdf";
File file = new File(path);
doc = new com.aspose.words.Document(pdfPath + "\\EN-9-19.docx");
com.aspose.words.Document doc1 = new com.aspose.words.Document();
doc1.removeAllChildren();
doc1.appendDocument(doc, ImportFormatMode.USE_DESTINATION_STYLES);
doc1.getCompatibilityOptions().setUseFELayout(true);
doc1.getStyles().getDefaultFont().setLocaleIdFarEast(2052);
try (FileOutputStream os = new FileOutputStream(file)) {
doc1.save(os, SaveFormat.PDF);
return path;
}
}
catch (Exception e1)
{
// TODO Auto-generated catch block
e1.printStackTrace();
}
How to solve the 2 quetion?
Best regard,