You're passing the wrong object types. The API is 
setFontAndSize(com.lowagie.text.pdf.BaseFont, float).

>> myObj.BaseFont = createObject("java","com.lowagie.text.pdf.BaseFont"); 
>> local.bf = myObj.BaseFont.Courier;

BaseFont.Courier is a string. What you need is a BaseFont object.  Try using 
the FontFactory class or BaseFont.createFont(...) 

//FontFactory
myObj.FontFactory = createObject("java","com.lowagie.text.FontFactory");        
 
local.bf = myObj.FontFactory.getFont(myObj.FontFactory.COURIER).getBaseFont();
 
//createFont()
myObj.BaseFont = createObject("java","com.lowagie.text.pdf.BaseFont");         
local.bf = myObj.BaseFont.createFont(myObj.BaseFont.COURIER, 
myObj.BaseFont.CP1252, myObj.BaseFont.NOT_EMBEDDED);

Then use javacast on the size like Mark mentioned.

//cast the size as a float
local.cb.setFontAndSize(local.bf, javacast("float", 12)); 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281488
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to