sounds complicated ... im not sure how you can create a new page in a pdf, but you got that covered from what i can tell. or maybe you just create a new pdf altogether. ..and im also not sure if i understand you correctly, but if i do....

just use a counter.

<cset last=0> <!--- used to count the last record --->
<cfset cnt=0> <!--- used to count the current record to write --->
<cset pdfdata=''> <!--- used for default data --->
<cfoutput query='query'>
<cset last=last+1> <!--- increment --->
<cfset cnt=cnt+1> <!--- increment --->
<cfset pdfdata='#pdfdata##YOUR_NEW_DATA_DRUG_DATA_OR_WHATEVER#'> <!--- this is the data to write to the pdf page, HTML or whatever is OK --->
<cfif cnt eq 3 or last eq query.recordcount> <!--- logic, is it time to write the file? --->
<cf_pdf ... /> <!--- create pdf file --->
<cfset cnt=0> <!--- resets counter --->
<cfset pdfdata=''> <!--- clears data to write --->
</cfif>
</cfoutput>

i think this is all you need to do... you can use cfloop instead of cfoutput query; the concept is the same.

joe velez
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to