private final FoDocumentFacade foDocumentFacade;
+ private float pageMarginInches = 0.4f;
+
public ExcelToFoConverter( Document document )
{
this.foDocumentFacade = new FoDocumentFacade( document );
final float paperHeightIn;
final float paperWidthIn;
{
- float requiredWidthIn = tableWidthIn + 2;
+ float requiredWidthIn = tableWidthIn + 2 * getPageMarginInches();
if ( requiredWidthIn < PAPER_A4_WIDTH_INCHES )
{
}
}
- final float leftMargin = 1;
- final float rightMargin = 1;
- final float topMargin = 1;
- final float bottomMargin = 1;
+ final float leftMargin = getPageMarginInches();
+ final float rightMargin = getPageMarginInches();
+ final float topMargin = getPageMarginInches();
+ final float bottomMargin = getPageMarginInches();
Element pageMaster = foDocumentFacade
.addSimplePageMaster( pageMasterName );
return foDocumentFacade.getDocument();
}
+ public float getPageMarginInches()
+ {
+ return pageMarginInches;
+ }
+
/**
* Returns <tt>false</tt> if cell style by itself (without text, i.e.
* borders, fill, etc.) worth a mention, <tt>true</tt> otherwise
block.setAttribute( "keep-together.within-line", "always" );
}
- processCellStyle( workbook, cell.getCellStyle(),
- tableCellElement, block );
+ processCellStyle( workbook, cell.getCellStyle(), tableCellElement,
+ block );
block.appendChild( text );
tableCellElement.appendChild( block );
textBlock.setAttribute( "font-family", triplet.fontName );
}
+ public void setPageMarginInches( float pageMarginInches )
+ {
+ this.pageMarginInches = pageMarginInches;
+ }
+
}