1 Reply Latest reply on Apr 23, 2012 6:13 AM by Bowie69

    CFPDF and DDF: _BookmarkTitle producing an error

    bryn51

      In the code below, <_BookmarkTitle/>  produces an error when present, whereas <_BookMarkPageCitation/> does not.

      That is to say, the code below executes without error and produces the expected results if I take out the _BookMarkTitle xml tag.

       

      If I leave out the TableOfContentsEntryPattern then I get the default table of contents which is in courier font.

       

      Page numbers are added to the PDF files and they then appear in the Table of Contents.

       

      What I would also like to do is produce a 2 level TOC whereas the default only produces a single level of TOC.

       

      Bookmark Title is an essential part of the table of contents.

       

      The intention of the code below is to produce formatting for the table of contents, which otherwise is produced in an ugly looking courier font.

      but _Bookmarktitle which is supposed to be a PDF assembler variable is not supported then this can never work.

       

      I dont understand why adobe would knobble bookmarkTitle when it is necessary to get the Table of Contents working properly.

       

      BTW this is running on CF9.0.1 with CHS 2 applied on Windows 7 platform.

       

       

      Does anyone have a better outcome on this ?

      <cfsavecontent variable="ddxfile">

      <?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="Out1">

                <PDF source="Title"/>  

                <PDFGroup>

                     <TableOfContents maxBookmarkLevel="2">

                          <Header styleReference="TOCheaderStyle"/>                                              

                      <TableOfContentsEntryPattern applicableLevel="all" >

                          <StyledText>

                               <p font-family="Arial" font-size="12pt">                                                     

                              <_BookmarkTitle/>                                                    

                                <Space/>                                                     

                               <Space/>                                                    

                                <leader leader-pattern="dotted"/>

                               <Space/>

                               <Space/> 

                               <_BookmarkPageCitation/>

                              </p>

                     </StyledText>

                 </TableOfContentsEntryPattern>

                </TableOfContents>

                           <Footer styleReference="FooterStyle"/>

                        <cfloop  from="1" to="#listlen(namelist)#" index="docnum"><cfset refname="Doc" & docnum><cfoutput><PDF source="#refname#"/></cfoutput>    

                          </cfloop>

       

                </PDFGroup>

            </PDF>

            <StyleProfile name="TOCheaderStyle">

                    <Header> 

                      <Center>

                            <StyledText>

                                 <p color="black" font-weight="bold" font="Arial" font-size="14pt">Table of Contents</p>

                            </StyledText>

                       </Center>

                   </Header>

              </StyleProfile>

            <StyleProfile name="FooterStyle">

                <Footer>

                   <Center>  

                     <StyledText>

                        <p color="black" font-weight="bold" font="Arial"><_PageNumber/></p>

                       </StyledText>

                    </Center>

               </Footer>

           </StyleProfile>

           </DDX>

      </cfsavecontent>