Remove page slicing, headers and footers on page_tags=none configuration

This commit is contained in:
George Litvinov 2018-11-02 14:18:06 +03:00 committed by Georgy Litvinov
parent ed27d5ffc1
commit 61b94b2886

View file

@ -153,7 +153,10 @@ public class TextConverter extends ConverterHelper {
extractRealTOC(onode);
}
//Split pages
onode = (Element) PageSplitter.splitSoftPageBreak(onode,ofr);
if (!pageTags.equals("none")) {
onode = (Element) PageSplitter.splitSoftPageBreak(onode,ofr);
}
//Debug.printNode(onode);
// Convert content
hnode = (Element)traverseBlockText(onode,hnode);
@ -162,7 +165,9 @@ public class TextConverter extends ConverterHelper {
// Add footnotes and endnotes
footCv.insertFootnotes(hnode,true);
addFooter(hnode);
if (!pageTags.equals("none")) {
addFooter(hnode);
}
endCv.insertEndnotes(hnode);
hnode = (Element) GreenstoneTags.endDocument(hnode);
// Generate all indexes
@ -1670,6 +1675,9 @@ public class TextConverter extends ConverterHelper {
if (inFootnote){
return hnode;
}
if (pageTags.equals("none")) {
return hnode;
}
Integer newPageNumber = null;
if (style != null) {
// If style:paragraph-properties extists and contain
@ -1756,7 +1764,9 @@ public class TextConverter extends ConverterHelper {
hnode = GreenstoneTags.StartDocument(hnode, sTitle,headingTags,pageTags, pageNum);
//Print header
addHeader(hnode);
if (!pageTags.equals("none")) {
addHeader(hnode);
}
return hnode;
}