All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.greetgo.msoffice.docx.Document Maven / Gradle / Ivy

There is a newer version: 0.5.9
Show newest version
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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy