I am extracting paragraphs from docx documents like so:
const fs = require('fs');
const { WordsApi, GetParagraphsOnlineRequest } = require("asposewordscloud");
let wordsApi = new WordsApi(CLIENT_ID, CLIENT_SECRET);
const requestDocument = fs.createReadStream("test.docx");
const request = new GetParagraphsOnlineRequest({
document: requestDocument,
});
wordsApi.getParagraphsOnline(request)
.then((requestResult: any) => {
console.log(requestResult);
});
Here is a sample of what gets returned in a document with three paragraphs, with the second paragraph (sentence one) containing a reference to a footnote at the bottom of the page:
{"paragraphLinkList": [
{
"link": {
"href": "https://api.aspose.cloud/v4.0/words",
"rel": "self"
},
"nodeId": "0.0.0",
"text": "Testing paragraph number 1."
},
{
"link": {
"href": "https://api.aspose.cloud/v4.0/words",
"rel": "self"
},
"nodeId": "0.0.1",
"text": "This is test paragraph 2, sentence 1. Here is the footnote. This is the other part of test paragraph 2, sentence 2."
},
{
"link": {
"href": "https://api.aspose.cloud/v4.0/words",
"rel": "self"
},
"nodeId": "0.0.1.4.0",
"text": " Here is the footnote."
},
{
"link": {
"href": "https://api.aspose.cloud/v4.0/words",
"rel": "self"
},
"nodeId": "0.0.2",
"text": "Test paragraph 3."
}
]
}
So “Here is the footnote.” is included both in the returned paragraph object (nodeId 0.0.1), and as a separate object (nodeId 0.0.1.4.0).
Is there any way of preventing the footnote from being included in the paragraph?