private static PageSequenceMaster createPageSequenceMaster(HeaderFooterPolicy hf,
String sectionName ) {
boolean noHeadersFootersAfterFirstPage = true;
PageSequenceMaster psm = getFactory().createPageSequenceMaster();
psm.setMasterName(sectionName);
RepeatablePageMasterAlternatives rpma = getFactory().createRepeatablePageMasterAlternatives();
psm.getSinglePageMasterReferenceOrRepeatablePageMasterReferenceOrRepeatablePageMasterAlternatives().add(rpma);
// has first header or footer?
if (hf.getFirstHeader()!=null || hf.getFirstFooter()!=null) {
ConditionalPageMasterReference cpmr1 = getFactory().createConditionalPageMasterReference();
cpmr1.setMasterReference(sectionName+"-firstpage");