use of org.docx4j.openpackaging.parts.WordprocessingML.HeaderPart in project docx4j-template by vindell.
the class Docx4J_简单例子 method createTextHeaderPart.
// 文字页面
public Relationship createTextHeaderPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory, String content, JcEnumeration jcEnumeration) throws Exception {
HeaderPart headerPart = new HeaderPart();
Relationship rel = t.addTargetPart(headerPart);
headerPart.setJaxbElement(getTextHdr(wordprocessingMLPackage, factory, headerPart, content, jcEnumeration));
return rel;
}
use of org.docx4j.openpackaging.parts.WordprocessingML.HeaderPart in project docx4j-template by vindell.
the class Docx4J_简单例子 method createHeaderPart.
// 图片页眉
public Relationship createHeaderPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory) throws Exception {
HeaderPart headerPart = new HeaderPart();
Relationship rel = t.addTargetPart(headerPart);
// After addTargetPart, so image can be added properly
headerPart.setJaxbElement(getHdr(wordprocessingMLPackage, factory, headerPart));
return rel;
}
use of org.docx4j.openpackaging.parts.WordprocessingML.HeaderPart in project docx4j-template by vindell.
the class Docx4J_简单例子2 method createHeaderPart.
// 图片页眉
public Relationship createHeaderPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory) throws Exception {
HeaderPart headerPart = new HeaderPart();
Relationship rel = t.addTargetPart(headerPart);
// After addTargetPart, so image can be added properly
headerPart.setJaxbElement(getHdr(wordprocessingMLPackage, factory, headerPart));
return rel;
}
use of org.docx4j.openpackaging.parts.WordprocessingML.HeaderPart in project docx4j-template by vindell.
the class Docx4J_简单例子2 method createTextHeaderPart.
// 文字页面
public Relationship createTextHeaderPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory, String content, JcEnumeration jcEnumeration) throws Exception {
HeaderPart headerPart = new HeaderPart();
Relationship rel = t.addTargetPart(headerPart);
headerPart.setJaxbElement(getTextHdr(wordprocessingMLPackage, factory, headerPart, content, jcEnumeration));
return rel;
}
use of org.docx4j.openpackaging.parts.WordprocessingML.HeaderPart in project docx4j-template by vindell.
the class Docx4J_例子2 method createTextHeaderPart.
// 文字页面
public Relationship createTextHeaderPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory, String content, boolean isUnderLine, String underLineSz, JcEnumeration jcEnumeration) throws Exception {
HeaderPart headerPart = new HeaderPart();
Relationship rel = t.addTargetPart(headerPart);
headerPart.setJaxbElement(getTextHdr(wordprocessingMLPackage, factory, headerPart, content, isUnderLine, underLineSz, jcEnumeration));
return rel;
}
Aggregations