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

The code is BELOW


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:beer;:beer;

<!--- 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="processDDX" ddxfile="#catalogueddx#"
inputfiles="#inputStruct#" outputfiles="#outputStruct#" name="ddxVar" />

<cfdump var="#ddxVar#">