Link to home
Start Free TrialLog in
Avatar of garyttu
garyttu

asked on

CFDocument Sizing Issue

I'm using CF8 (although I had this problem in CF7 as well). I have the only hotfix installed.

When I use CFDocument, the header and footer are smaller in scale than the body.

Here is example code:

<cfdocument format="pdf">
<cfdocumentitem type="header">
<table>
<tr>
<td>testing</td>
<td>testing2</td>
</tr>
</table>
</cfdocumentitem>
<table>
<tr>
<td>testing</td>
<td>testing2</td>
</tr>
</table>
<cfdocumentitem type="footer">
<table>
<tr>
<td>testing</td>
<td>testing2</td>
</tr>
</table>
</cfdocumentitem>
</cfdocument>

Am I missing something?
Avatar of siva_siva
siva_siva
Flag of India image

pdf format is slightly differ than web page format.
Avatar of garyttu
garyttu

ASKER

the entire page is pdf
I have usually defined all of my font styles with CSS for the documents.  However, I haven't tried this with the header and footer... I would assume that they would utilize defined CSS styles however since they are part of the HTML output rendered into PDF.  One other thing you can do which I have used for particularly difficult pdf page rendering (image placement like for letterhead, etc..) is to define my page layout using the ColdFusion Report Builder and just including the rendered report template as the source.

Your solution may require more fluidity that <cfreport> provides however, in which case I would try working with CSS to define all the styles in the <cfdocument> that you desire.
Avatar of garyttu

ASKER

They both support CSS although with or without it, they still are sized differently. I have done a straight table without CSS and ones with CSS. I know CSS is working for inside and outside the header because I can do a style font-size and the size adjusts. The problem is 24 px font for one does not display the same for the other.

I'll check out the report builder, but most likely I imagine you're right that we're going to need more fludity.

 
ASKER CERTIFIED SOLUTION
Avatar of andrewlorien
andrewlorien
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial