Package org.docx4j.wml

Examples of org.docx4j.wml.HeaderReference


      log.debug("for h|f relId: " + relId);
     
      Part part = rels.getPart(relId);
      if (rel instanceof HeaderReference  ) {
       
        HeaderReference headerReference = (HeaderReference)rel;
       
        if (headerReference.getType() == HdrFtrRef.FIRST) {
          firstHeader = (HeaderPart)part;
          if (titlePage!=null && titlePage.isVal()) {
            log.debug("setting first page header");
            firstHeaderActive = (HeaderPart)part;
          }
        } else if (headerReference.getType() == HdrFtrRef.EVEN) {
          log.debug("setting even page header");
          evenHeader =  (HeaderPart)part;
        else {
          log.debug("setting default page header");
          defaultHeader = (HeaderPart)part;
View Full Code Here


      sectPr = factory.createSectPr();
      wordprocessingMLPackage.getMainDocumentPart().addObject(sectPr);
      sections.get(sections.size() - 1).setSectPr(sectPr);
    }

    HeaderReference headerReference = factory.createHeaderReference();
    headerReference.setId(relationship.getId());
    headerReference.setType(HdrFtrRef.DEFAULT);
    sectPr.getEGHdrFtrReferences().add(headerReference);

  }
View Full Code Here

      sectPr = objectFactory.createSectPr();
      wordprocessingMLPackage.getMainDocumentPart().addObject(sectPr);
      sections.get(sections.size() - 1).setSectPr(sectPr);
    }

    HeaderReference headerReference = objectFactory.createHeaderReference();
    headerReference.setId(relationship.getId());
    headerReference.setType(HdrFtrRef.DEFAULT);
    sectPr.getEGHdrFtrReferences().add(headerReference);// add header or
    // footer references

  }
View Full Code Here

TOP

Related Classes of org.docx4j.wml.HeaderReference

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.