Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Fitting footer on pdf report
femibyte
Hi, I am having trouble getting my footer to fit at the bottom of my report when it is rendered as a pdf. The report is being developed using teh Java Design Engine API.<br />
<br />
I have tried to reduce the top and bottom margins of the report to no avail. My footer gets truncated and the only way to get it to fit is to reduce font size so much that it is illegible. <br />
<br />
Here is the Java code I am using to add the footer:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>private void createFooter(SimpleMasterPageHandle page) throws ContentException, NameException,SemanticException
{
DesignElementHandle footer= elementFactory.newTextItem("footer");
footer.setProperty("contentType", "html");
String footerText=repMetaData.getFooter();
footer.setStringProperty("content", footerText);
String footerTextSize=repMetaData.getFooterFontSize();
setDesignElementProperty(footer,StyleHandle.FONT_SIZE_PROP, footerTextSize);
//Add in a simple page footer to our master page
page.getPageFooter().add(footer);
}
private void createMasterPages( ) throws ContentException, NameException,SemanticException
{
SimpleMasterPageHandle page=elementFactory.newSimpleMasterPage(reportTitle);
page.setOrientation(DesignChoiceConstants.PAGE_ORIENTATION_LANDSCAPE);
page.setProperty(MasterPageHandle.TOP_MARGIN_PROP,repMetaData.getTopMargin());
//page.setProperty(MasterPageHandle.TOP_MARGIN_PROP,"3mm");
createFooter(page);
setMargins(page);
reportDesignHandle.getMasterPages( ).add( page );
}
</pre>
<br />
Please let me know if you have any suggestions.
Find more posts tagged with
Comments
mwilliams
You'll need to actually set the height of the page footer to a large enough value for your footer to fit. The default height is a half of an inch. Anything that doesn't fit, is truncated.
femibyte
Ok, let me try that thanks.
mwilliams
Ok. Let me know if you run into issues.