Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / May 2006



Tip: Looking for answers? Try searching our database.

send vars to fdf --> pdf

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
glossen - 30 May 2006 14:47 GMT
How do I send vars to a PDF file i built using Adobe Designer 7?  I had a great
CF script i would use to send to my old Pdf files building an fdf file but that
doesnt seem to work with these designer 7 publications.  Is it because its all
XML?

Ill include my old script maybe i can modify it =)  Thanks for any help.

<cfcontent type="application/vnd.fdf">
<cfoutput>%FDF-1.2
1 0 obj <<
/FDF <<
/Fields
[
</cfoutput>
<cfloop collection=#VarStruct# item="VarName">
    <cfif '#VarName#' neq 'PDFURL'>
        <cfoutput> << /T (#VarName#) /V (#Evaluate("VarStruct.#VarName#")#)>>
        </cfoutput>
    </cfif>
</cfloop>
<cfoutput> ]
/F (#siteRoot#v#Session.versionID#/contact/forms/acord/#VarStruct.PDFURL#)

endobj
trailer
<</Root 1 0 R>>
%%EOF
</cfoutput>
glossen - 30 May 2006 16:36 GMT
I have modified the above using the xfdf Draft Arc Document however i am having
difficulty bringing it up  due to an XML parsing error.  Here is my modified
code.

<cfcontent type="application/vnd.adobe.xfdf">
    <cfoutput>
        <?xml version="1.0" encoding="UTF-8"?>
        <xfdf xmlns="<a target=_blank class=ftalternatingbarlinklarge
href="http://ns.adobe.com/xfdf/"">http://ns.adobe.com/xfdf/"</a>
xml:space="preserve">
        <f
href="#siteRoot#v#Session.versionID#/contact/forms/acord/#VarStruct.PDFURL#"/>
        <ids original="7A0631678ED475F0898815F0A818CFA1"
            modified="BEF7724317B311718E8675B677EF9B4E"/>
         <fields>
             <cfloop collection=#VarStruct# item="VarName">
              <field name="#VarName#">
                 <value>#Evaluate("VarStruct.#VarName#")#</value>
              </field>
            </cfloop>  
         </fields>
        </xfdf>
    </cfoutput>

Is there something wrong with using that cfcontect type?  
glossen - 30 May 2006 21:59 GMT
Im gonna post this resolution because I found absolutely no resources on this
topic on either google or adobe's site.  Maybe because its so new.  Anyways I
had 2 problems the first being none of my data from my xfdf converter was
getting on my pdf document.  The resolution there came in digging through the
xml source.  When naming a field and value in the xfdf file you cant just name
the field name like "date" you have to go through the whole tree of your
document: ..."F.P1.date"><value..." With that it sent my values over.

My second problem was now the data was going over but it only showed up if you
clicked on that field =(... so i had to go into Lifecycle Designer and
highlight the field and go to the Object tab then under to the field tab and
uncheck "plain text only".. even though the field was sporting a nice yellow
error icon it worked like a gem.

I hope this helps someone because this XML implementation of pdf is freekin
great!

- Aaron
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.