1 Reply Latest reply on Mar 6, 2008 9:08 AM by MartinWJones

    CFPDF ddx replaceExisting attribute in header and Footer


      I would LOVE to hear from anybody experimenting with the new CFPDF tag in CF8, especially with writing pdfs using the ddx xml files.
      There is an attribute in the header and footer tags called replaceExisting="true" which is supposed to allow you to overwrite any existing headers/footers but I have had no luck getting this to work.

      Here is some code:
      <?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="output1">
      <PDF source="doc1">
      <Header replaceExisting="true">
      <StyledText><p color="#333333" font="Arial" font-size="9pt">Personal Report for customer name here</p></StyledText>
      <Footer replaceExisting="true">
      <p color="#333333" font="Arial" font-size="7pt">Valid only for customer name here until dd/mm/yyyy</p>
      <p color="#333333" font="Arial" font-size="7pt">Page <_PageNumber/> of <_LastPageNumber/></p>
      This is almost identical to the code in one of the examples in the CF8 docs (except for the replaceExisting attribute) and CF8 passes it using the isddx() function see:

      I found the reference to this attribute in the livecycle docs:
      http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/ddxRefMain.163.35.html (Footer)
      http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/ddxRefMain.163.36.html (Header)

      As an aside - Jeff Chastain also has a nice article about CFPDF and ddx http://www.adobe.com/devnet/coldfusion/articles/ddx_pdf.html
      but it doesn't provide any clues about resolving this attribute.

      If ANYBODY has been able to get this to work (or not) PLEASE respond.


        • 1. Re: CFPDF ddx replaceExisting attribute in header and Footer
          MartinWJones Level 1
          OK - I have done some further testing and I could be wrong here!!

          For pdf's that I create with ColdFusion that have a Header and Footer, the replaceExisting="true" WORKS!!

          I have tried to convert most of the pdf's I have been given for testing to text (XML) which doesn't show headers and footers BUT it does show the text I was trying to replace which suggests to me that the original pdfs didn't have headers and footers, just a very thin margin.

          There are some pdf's that have been created by free on-line pdf generators AND livecyle doesn't seem to like these at all. If I try and convert those to text I get an error: "failed: FlateDecode Filter"

          I will leave this topic OPEN for now in case anyone else can provide some input.