Examples of XWPFFooter


Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    }
    for(int i=0; i<sectPr.sizeOfFooterReferenceArray(); i++) {
      // Get the footer
      CTHdrFtrRef ref = sectPr.getFooterReferenceArray(i);
      PackagePart ftrPart = doc.getPartById(ref.getId());
      XWPFFooter ftr = new XWPFFooter(doc,
          FtrDocument.Factory.parse(ftrPart.getInputStream()).getFtr());

      // Assign it
      Enum type = ref.getType();
      assignFooter(ftr, type);
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    public XWPFFooter createFooter(Enum type, XWPFParagraph[] pars) throws IOException {
      XWPFRelation relation = XWPFRelation.FOOTER;
      String pStyle = "Footer";
      int i = getRelationIndex(relation);
      FtrDocument ftrDoc = FtrDocument.Factory.newInstance();
      XWPFFooter wrapper = (XWPFFooter)doc.createRelationship(relation, XWPFFactory.getInstance(), i);

      CTHdrFtr ftr = buildFtr(type, pStyle, wrapper, pars);
      wrapper.setHeaderFooter(ftr);
     
      OutputStream outputStream = wrapper.getPackagePart().getOutputStream();
      ftrDoc.setFtr(ftr);
     
        XmlOptions xmlOptions = commit(wrapper);

      assignFooter(wrapper, type);
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    }
    for(int i=0; i<sectPr.sizeOfFooterReferenceArray(); i++) {
      // Get the footer
      CTHdrFtrRef ref = sectPr.getFooterReferenceArray(i);
      PackagePart ftrPart = doc.getPartById(ref.getId());
      XWPFFooter ftr = new XWPFFooter(
          FtrDocument.Factory.parse(ftrPart.getInputStream()).getFtr()
      );

      // Assign it
      Enum type = ref.getType();
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    public XWPFFooter createFooter(Enum type, XWPFParagraph[] pars) throws IOException {
      XWPFRelation relation = XWPFRelation.FOOTER;
      String pStyle = "Footer";
      int i = getRelationIndex(relation);
      FtrDocument ftrDoc = FtrDocument.Factory.newInstance();
      XWPFFooter wrapper = (XWPFFooter)doc.createRelationship(relation, XWPFFactory.getInstance(), i);

      CTHdrFtr ftr = buildFtr(type, pStyle, wrapper, pars);
     
      OutputStream outputStream = wrapper.getPackagePart().getOutputStream();
      ftrDoc.setFtr(ftr);
     
        XmlOptions xmlOptions = commit(wrapper);

      assignFooter(wrapper, type);
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

        }
        for(int i=0; i<sectPr.sizeOfFooterReferenceArray(); i++) {
            // Get the footer
            CTHdrFtrRef ref = sectPr.getFooterReferenceArray(i);
            POIXMLDocumentPart relatedPart = doc.getRelationById(ref.getId());
            XWPFFooter ftr = null;
            if (relatedPart != null && relatedPart instanceof XWPFFooter)
            {
                ftr = (XWPFFooter) relatedPart;
            }
            // Assign it
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    public XWPFFooter createFooter(Enum type, XWPFParagraph[] pars) throws IOException {
        XWPFRelation relation = XWPFRelation.FOOTER;
        String pStyle = "Footer";
        int i = getRelationIndex(relation);
        FtrDocument ftrDoc = FtrDocument.Factory.newInstance();
        XWPFFooter wrapper = (XWPFFooter)doc.createRelationship(relation, XWPFFactory.getInstance(), i);

        CTHdrFtr ftr = buildFtr(type, pStyle, wrapper, pars);
        wrapper.setHeaderFooter(ftr);

        OutputStream outputStream = wrapper.getPackagePart().getOutputStream();
        ftrDoc.setFtr(ftr);

        XmlOptions xmlOptions = commit(wrapper);

        assignFooter(wrapper, type);
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    }
    for(int i=0; i<sectPr.sizeOfFooterReferenceArray(); i++) {
      // Get the footer
      CTHdrFtrRef ref = sectPr.getFooterReferenceArray(i);
      PackagePart ftrPart = doc.getPartById(ref.getId());
      XWPFFooter ftr = new XWPFFooter(
          FtrDocument.Factory.parse(ftrPart.getInputStream()).getFtr()
      );

      // Assign it
      if(ref.getType() == STHdrFtr.FIRST) {
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    }
    for(int i=0; i<sectPr.sizeOfFooterReferenceArray(); i++) {
      // Get the footer
      CTHdrFtrRef ref = sectPr.getFooterReferenceArray(i);
      PackagePart ftrPart = doc.getPartById(ref.getId());
      XWPFFooter ftr = new XWPFFooter(
          FtrDocument.Factory.parse(ftrPart.getInputStream()).getFtr()
      );

      // Assign it
      Enum type = ref.getType();
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    public XWPFFooter createFooter(Enum type, XWPFParagraph[] pars) throws IOException {
      XWPFRelation relation = XWPFRelation.FOOTER;
      String pStyle = "Footer";
      int i = getRelationIndex(relation);
      FtrDocument ftrDoc = FtrDocument.Factory.newInstance();
      XWPFFooter wrapper = (XWPFFooter)doc.createRelationship(relation, XWPFFactory.getInstance(), i);

      CTHdrFtr ftr = buildFtr(type, pStyle, wrapper, pars);
     
      OutputStream outputStream = wrapper.getPackagePart().getOutputStream();
      ftrDoc.setFtr(ftr);
     
        XmlOptions xmlOptions = commit(wrapper);

      assignFooter(wrapper, type);
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFFooter

    }
    for(int i=0; i<sectPr.sizeOfFooterReferenceArray(); i++) {
      // Get the footer
      CTHdrFtrRef ref = sectPr.getFooterReferenceArray(i);
      PackagePart ftrPart = doc.getPartById(ref.getId());
      XWPFFooter ftr = new XWPFFooter(
          FtrDocument.Factory.parse(ftrPart.getInputStream()).getFtr());

      // Assign it
      Enum type = ref.getType();
      assignFooter(ftr, type);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.