Cfdocument – different behavior in CF7 vs CF8
Written on 26 October 2011, 02:26pm
Tagged with: bugs, coldfusion, pdf
The simple code below should write a PDF file on disk. This file should contain an image and two lines of text – next to the image (ignore the use of tables for layout 😛 ):
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<cfoutput>
<cfdocument filename="output#Left(server.ColdFusion.ProductVersion,1)#.pdf"
format="pdf" overwrite="yes">
<cfdocumentsection marginleft="1">
<table>
<tr>
<td><img src='../images/image.gif'></td>
<td>This is a simple text<br>spanning on two lines.</td>
</tr>
</table>
</cfdocumentsection>
</cfdocument>
</cfoutput>
The result is quite different in ColdFusion 7 vs ColdFusion 8, as the following image shows:
In CF8, the PDF text and image appear visible smaller than in CF7.
Now the strange part: if I add unit
attribute to cfdocument
tag (with any value, ‘cm’ or ‘in’) – the CF8 version shows exactly the same size as CF7.
Anyone has any idea why this happens?
- Likes (0)
- Comments (0)
-
Share