According to the docs, cfdocument supports page-break-before and 
page-break-after CSS styles.  You might want to try using one of those, 
instead of or in addition to breaking it into items.

--Ben Doom

Bruce Sorge wrote:
> I checked the docs and I don't think that this is possible, but I 
> thought I would ask anyway.
> 
> Here is my code:
>                 <!--- Create the PDF document --->
>                 <cfdocument name="MasterSchedule" format="pdf">
>                 <!--- Create the header for each page --->
>                 <cfdocumentitem type="header">
>                   <font size="3"><i><strong>Master Bus Route 
> Report</strong></i></font>
>                 </cfdocumentitem>
>                 <!--- Output all of the schedules, grouping by the 
> Route_ID --->
>                     <cfoutput query="getAllRoutes" group="Route_ID">
>                     <table align="center" cellpadding="0" 
> cellspacing="0" border="0" width="100%">
>                         <tr>
>                             <th colspan="4">
>                                 
> #School_Name#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>                                 #Route_Name#
>                              </th>
>                          </tr>
>                          <cfoutput>
>                              <tr class="contacts_cell">
>                                 <td width="40%">
>                                     #StreetName#
>                               </td>
>                               <td width="20%">
>                                     (#Side#)
>                               </td>
>                               <td width="15%">
>                                     #Pick_Up#
>                               </td>
>                               <td width="15%">
>                                     #Drop_Off#
>                               </td>  
>                            </tr>
>                         </cfoutput>
>                     </table>
>                 </cfoutput>
>                     </cfdocument>
>                       <!--- Set the folder to save the document --->
>                         <cfset savedFolder = 
> expandPath("../pdf/MasterSchedule")>
>                       <!--- Write the file to the named folder above --->
>                         <cffile action="write" 
> file="#savedFolder#/MasterSchedule.pdf" output="#MasterSchedule#" 
> nameconflict="overwrite">
>                       <!--- Output the PDF --->
>                         <cfcontent type="application/pdf" reset="true" 
> file="#savedFolder#/MasterSchedule.pdf">
> 
> What is happening is this. When the PDF outputs, the part with 
> school_name and Route_Name is sometimes left hanging at the bottom of 
> the page and then the corresponding schedule begins at the next page. 
> What I want is that if this section is all that is left on the page, I 
> want it to break at that point.
> 
> I know that CFDOCUMENT is a bit limited but I am hoping that I can at 
> least do this.
> 
> Thanks,
> 
> Bruce
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

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

Reply via email to