This is an archived forum post. The information may be outdated. Contact us if you have any
Formatting of setFooterHtml / Pagination
wrote on 2012-06-13:
Is there a way to add CSS or other formatting to the content in setFooterHtml?
For example, using the API we are submitting requests with setFooterHtml set to:
<div class=?page_numbers?>Page %p of %n</div>
We provide corresponding CSS to format that content.
But the content is not following the CSS rules when it gets converted to PDF. This is probably because setFooterHtml is rendered *after* the HTML/CSS has been rendered, and is not considered part of the original document. Just guessing.
We'd really like to tweak the size and positioning of that text. Is there any way to do this?
Also, I tried this and it also didn't work:
<div style="clear:both; text-align:right; font-family:Arial, Helvetica, sans-serif; font-size:10px;color:#000000;">%p of %n</div>
wrote on 2012-06-14:
Style sheets defined in the main document are not applied on the footer content. You can use inline CSS to style the footer.
I'm not sure why it does not work for you but I tried your HTML code and it came out in PDF as expected. Can you post your API integration code so we can look into it?
wrote on 2012-06-15:
Here are the settings being passed to the pdfcrowd object: