Package org.openxmlformats.schemas.wordprocessingml.x2006.main

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.FtrDocument


     */
    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);
        ftrDoc.save(outputStream, xmlOptions);
        outputStream.close();
        return wrapper;
    }
View Full Code Here


   
    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);
    ftrDoc.save(outputStream, xmlOptions);
    outputStream.close();
      return wrapper;
    }
View Full Code Here

   
    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);
    ftrDoc.save(outputStream, xmlOptions);
    outputStream.close();
      return wrapper;
    }
View Full Code Here

    @Override 
      protected void onDocumentRead(){
        bodyElements = new ArrayList<IBodyElement>();
          paragraphs = new ArrayList<XWPFParagraph>();
          tables= new ArrayList<XWPFTable>();
          FtrDocument ftrDocument = null;
      InputStream is;
      try {
        is = getPackagePart().getInputStream();
        ftrDocument = FtrDocument.Factory.parse(is);
        headerFooter = ftrDocument.getFtr();
            // parse the document with cursor and add
            // the XmlObject to its lists
        XmlCursor cursor = headerFooter.newCursor();
            cursor.selectPath("./*");
            while (cursor.toNextSelection()) {
View Full Code Here

   
    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);
    ftrDoc.save(outputStream, xmlOptions);
    outputStream.close();
      return wrapper;
    }
View Full Code Here

    @Override 
      protected void onDocumentRead(){
        bodyElements = new ArrayList<IBodyElement>();
          paragraphs = new ArrayList<XWPFParagraph>();
          tables= new ArrayList<XWPFTable>();
          FtrDocument ftrDocument = null;
      InputStream is;
      try {
        is = getPackagePart().getInputStream();
        ftrDocument = FtrDocument.Factory.parse(is);
        headerFooter = ftrDocument.getFtr();
            // parse the document with cursor and add
            // the XmlObject to its lists
        XmlCursor cursor = headerFooter.newCursor();
            cursor.selectPath("./*");
            while (cursor.toNextSelection()) {
View Full Code Here

    @Override 
      protected void onDocumentRead(){
        bodyElements = new ArrayList<IBodyElement>();
          paragraphs = new ArrayList<XWPFParagraph>();
          tables= new ArrayList<XWPFTable>();
          FtrDocument ftrDocument = null;
      InputStream is;
      try {
        is = getPackagePart().getInputStream();
        ftrDocument = FtrDocument.Factory.parse(is);
        headerFooter = ftrDocument.getFtr();
            // parse the document with cursor and add
            // the XmlObject to its lists
        XmlCursor cursor = headerFooter.newCursor();
            cursor.selectPath("./*");
            while (cursor.toNextSelection()) {
View Full Code Here

   
    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);
    ftrDoc.save(outputStream, xmlOptions);
    outputStream.close();
      return wrapper;
    }
View Full Code Here

    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);
        ftrDoc.save(outputStream, xmlOptions);
        outputStream.close();
        return wrapper;
    }
View Full Code Here

    }

    @Override 
    protected void onDocumentRead() throws IOException{
        super.onDocumentRead();
        FtrDocument ftrDocument = null;
        InputStream is;
        try {
            is = getPackagePart().getInputStream();
            ftrDocument = FtrDocument.Factory.parse(is);
            headerFooter = ftrDocument.getFtr();
            // parse the document with cursor and add
            // the XmlObject to its lists
            XmlCursor cursor = headerFooter.newCursor();
            cursor.selectPath("./*");
            while (cursor.toNextSelection()) {
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.wordprocessingml.x2006.main.FtrDocument

Copyright © 2018 www.massapicom. 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.