kz.greetgo.msoffice.docx.Document Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of greetgo.msoffice Show documentation
Show all versions of greetgo.msoffice Show documentation
greetgo library to generate or parse MS Office files
package kz.greetgo.msoffice.docx;
import kz.greetgo.msoffice.PageOrientation;
import java.io.PrintStream;
public class Document extends DocumentFlow {
private PageOrientation pageOrientation = PageOrientation.PORTRAIT;
private Integer top = 1134;
private Integer bottom = 1134;
private Integer left = 1701;
private Integer right = null;
public PageOrientation getPageOrientation() {
return pageOrientation;
}
public void setPageOrientation(PageOrientation pageOrientation) {
this.pageOrientation = pageOrientation;
}
public Integer getTop() {
return top;
}
public void setTop(Integer top) {
this.top = top;
}
public Integer getBottom() {
return bottom;
}
public void setBottom(Integer bottom) {
this.bottom = bottom;
}
public Integer getLeft() {
return left;
}
public void setLeft(Integer left) {
this.left = left;
}
public Integer getRight() {
return right;
}
public void setRight(Integer right) {
this.right = right;
}
Document(String partName, MSHelper msHelper) {
super(partName, msHelper);
}
@Override
public ContentType getContentType() {
return ContentType.DOCUMENT;
}
@Override
protected void writeTopXml(PrintStream out) {
out.print("\n");
out.print("");
out.print("");
}
@Override
protected void writeBottomXml(PrintStream out) {
out.print("");
writeReferences(out);
out.print(" ");
out.print(" ");
out.print(" ");
out.print(" ");
out.print(" ");
out.print(" ");
out.print(" ");
}
public void addPageBreak() {
createPara().addPageBreak();
}
}