tracker issue : CF-3758430

select a category, or use search below
(searches all categories and all time range)
Title:

cfhtmltopdfitem units of margin attributes

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Reto Aeberli / Reto Aeberli (Reto Aeberli)

Created: 05/10/2014

Components: Document Management, PDF Generation (CFHTML2PDF)

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 1

Listed in the version 11.0.03.292480 Issues Fixed doc
Problem Description:
According to the docs of cfhtmltopdfitem the default unit used for the margins are inch or if specified the value of the unit attribute. But there is no unit attribute documented on this tag and using it throws an error. According to my tests the unit from the parent tag is not used. 

Steps to Reproduce:
create a file and paste the following code:
<cfhtmltopdf pagetype="a4" orientation="portrait" unit="cm" marginTop="3" marginLeft="2.5" marginRight="1" marginBottom="2" >
	<cfhtmltopdfitem type="header" align="right" marginLeft="2.5" marginRight="1">
		<cfoutput>#dateFormat(now(), 'dd. mmmm yyyy')#, _PAGENUMBER/_LASTPAGENUMBER</cfoutput>
	</cfhtmltopdfitem>
	<table width="100%"><tr><td bgcolor="silver">&nbsp;</td></tr></table>
</cfhtmltopdf>

Actual Result:
The header text is not 1cm away from the right side. 

Expected Result:
The header aligned with grey box from the table, 1cm away from the right side. 

Any Workarounds:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3758430

External Customer Info:
External Company:  
External Customer Name: Reto CENTINATED GmbH
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

+1 - I've verified this as well
Vote by External U.
12199 | May 18, 2014 01:38:23 AM GMT
Also confirmed.. The header appears at the same place in both of these examples, which means the 2nd example is incorrect b/c cfhtmltopdfitem ignores the unit="cm": <cfhtmltopdf pagewidth="2" pageheight="2" pagetype="custom" margintop="0" marginright="0" marginbottom="0" marginleft="0"> <cfhtmltopdfitem type="header" margintop="1">header</cfhtmltopdfitem> body </cfhtmltopdf> <cfhtmltopdf unit="cm" pagewidth="5.1" pageheight="5.1" pagetype="custom" margintop="0" marginright="0" marginbottom="0" marginleft="0"> <cfhtmltopdfitem type="header" margintop="1">header</cfhtmltopdfitem> body </cfhtmltopdf> Thanks!, -Aaron
Comment by External U.
12195 | May 18, 2014 01:40:26 AM GMT
This issue is fixed and this fix will be available in upcoming update of ColdFusion 11.
Comment by Nimit S.
12196 | September 24, 2014 01:50:36 AM GMT
Hi Nimit, I've verified this is fixed in CF11 Update 3. Thanks!, -Aaron
Comment by External U.
12197 | November 03, 2014 04:54:08 AM GMT
Thanks Aaron for confirming.
Comment by Nimit S.
12198 | November 03, 2014 06:10:07 AM GMT