I am creating a very large PDF using the CFPDF tag with the action="" to create a Table of Contents at the beginning of my PDF.

Here is the code:

    <!--- Create DDX instructions --->
    <cfsavecontent variable="catalogueddx">
        <?xml version="1.0" encoding="UTF-8"?>
        <DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd">
            <PDF result="out">
                <PDF source="cataloguetitle"/>
                <TableOfContents maxBookmarkLevel="infinite" bookmarkTitle="Table of Contents" includeInTOC="false">
                    <Footer styleReference="CatalogueFooter" />
                </TableOfContents>
                <PDF source="coi">
                    <Footer styleReference="CatalogueFooter" />
                </PDF>
                <cfoutput query="depts">
                    <PDF source="dept#depts.id#">
                        <Footer styleReference="CatalogueFooter" />
                    </PDF>
                </cfoutput>
            </PDF>
           
            <StyleProfile name="CatalogueFooter">
                <Footer>
            <Right>
                <StyledText><p color="gray" font-family="Georgia, Times, serif">Page <_PageNumber/> of <_LastPageNumber/></p></StyledText>
          </Right>
                    <Left>
                        <StyledText><p color="gray" font-family="Georgia, Times, serif">Updated <cfoutput>#DateFormat(now(),"mmm. d, yyyy")#</cfoutput></p></StyledText>
                    </Left>
          </Footer>
            </StyleProfile>
        </DDX>
    </cfsavecontent>

    <!--- Trim and validate DDX instructions --->
    <cfset catalogueddx = trim(catalogueddx) />
    <cfif not isDDX(catalogueddx)>
        <cfthrow message="DDX is invalid" detail="#catalogueddx#" />
    </cfif>
   
    <!--- Create input and output structs for CFPDF --->
    <cfset outputStruct = {out='catalogue.pdf'}>
    <cfset inputStruct = {cataloguetitle='pdf\title.pdf', coi='pdf\coi.pdf'}>
    <cfloop query="depts">
        <cfset inputStruct['dept'&depts.id] = 'pdf\'&depts.id&'.pdf'>
    </cfloop>   
   
    <!--- Finally, lets process the DDX instructions and create the catalogue.pdf --->
    <cfpdf action="" ddxfile="#catalogueddx#" inputfiles="#inputStruct#" outputfiles="#outputStruct#" name="ddxVar" />
   
    <cfdump var="#ddxVar#">


When I dump the output variable, ddxVar, I get the following failed error message:

failed: DDXM_S18005: An error occurred in the PrepareTOC phase while building <TableOfContents>. Cause given.

The problem is that I can't seem to correct this error no matter what I do.  If I remove the <TableOfContents> element, then it works perfect - it include the bookmarks, merges all the PDFs, etc.. just no TOC.

Any thoughts, ideas or suggestions?

Thanks,
Brian

Brian Love
Web Integration Specialist, Web Services
Hamilton College
315.859.4868
[EMAIL PROTECTED]
Wednesday, August 08, 2007 3:35 PM

P.S. Even though it says "cause given" - its lying!!

________________________________________________________________ To unsubscribe: send a message to [EMAIL PROTECTED] with 'Unsubscribe CFUGCNY' in the body. To send a message to the list: [email protected]

List archives: http://www.mail-archive.com/[email protected]/index.html Visit our website: http://www.cfugcny.org

Reply via email to