Skip navigation
bryn51
Currently Being Moderated

CFPDF and DDF: _BookmarkTitle producing an error

Jan 15, 2012 7:46 PM

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>

 
Replies
  • Currently Being Moderated
    Apr 23, 2012 6:13 AM   in reply to bryn51

    I am also getting this error, and need to deliver a solution soon, really struggling with this.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points