You cannot split the opening and closing tags in that manner.
One option is to place the content inside a cfinclude. Then use the
include inside your cfif statements.
<cfparam name="pdf" default="">
<cfif pdf eq '1'>
<cfdocument format="pdf">
<cfinclude template="file_with_the_content.cfm">
</cfdocument>
<cfelse>
<cfinclude template="file_with_the_content.cfm">
</cfif>