Category: CFML

May 14 2009

Population PDF Forms with ColdFusion 8

Now that Adobe owns ColdFusion, a lot of PDF functionality has been added to CF8. Amongst that is the ability to populate PDF Forms. This means you can pre-populate forms for clients / members - how many times have you had to fill out a form and think to yourself, 'they already know this stuff!!'

The client / member can then update any info if required. With the proper licencing, you can save the data in the PDF, or have the PDF submit the data back to the web server.

Recently I was given the job of reproducing Contract Notes for clients. The origion is produced by printing the data onto stationary; but as the client wont have the sationary, this is not going to work. No drama for me, I am a CF developer :-)

The first think I did was to open up the PDF in Adobe Acrobat and add fields to the document to create the PDF form. This document is not to be alter by the client so licencing was not an issue. In fact, I get ColdFusion to flatten the file after it is populated so the client can not modify that data and then print it.

In previous of CF, you would hvae to use CFPDF to read the document, then other CF tags to get the fields and poplaute and bluh bluh bluh - doesn't matter any more cos CF8 simplifies all that with a new tag - CFPDFFORM and it's buddy CFPDFFORMPARAM

<cfpdfform source="#pdfPath##pdfDoc#"
                 destination="#pdfPath##pdfTemp#"
                 action="populate"
                 overwrite="yes" >
    <cfpdfformparam name="Branch" value="#qryCnote.BranchName#" />
    <cfpdfformparam name="Advisor" value="#qryCnote.AdvisorName#" />
</cfpdfform>

Just add a CFPDFFORMPARAM for each form field and give it a value <hand in the air and shout> 'Clear!'

And to get rid of the form fields, just use the flatten attributes.

<cfpdf action="write"
           source="#pdfPath##pdfTemp#"
           destination="#pdfPath##pdfTemp#"
           flatten="yes"
           overwrite="yes" />

And finally, push it back to the browser

<cfheader NAME='Content-Disposition'
               VALUE='attachment;filename=#saveAsName#' />
<cfheader name="cache-control" value="" />
<cfheader name="pragma" value="" />

<cftry>
    <cfcontent type="application/pdf"
                    file="#pdfPath##pdfTemp#"
                    deletefile="yes"

                    reset="yes" />
    <cfcatch>
    <!--- prevent unnecessary log entries when user
           cancels download whilst it is in progress
    --->
    </cfcatch>
</cftry>

Posted by AJ Mercer at 3:48 pm - Categories: ColdFusion | CFML

Apr 1 2009

Railo 3.1 Open Source is here

The beta of Railo 3.1, the Open Source version, was released to day. I will update this blog entry once I have had a little play with this much anticipated release. One of the first things I will be checking out is the Extention Manager - download and install application from the Railo Administrator. Gert has been letting a few sneak peeks slip out that makes me think I will not be getting much sleep tonight (2am release in Perth).

Railo 3.1 LogoAlong with the engine, new web sites too.

If you want to know more about Railo, and will be in Sydney in May (21-22), make sure you see Gert Franz at webDU 2009.

I am offcially a Railo Fan - it says so right on their site ;-)

Posted by AJ Mercer at 2:00 am - Categories: CFML | ColdFusion | Railo

Mar 9 2009

webDU 2009

I want to go to webDU too

I am all booked in for another trip to Sydney, this time the familiy is coming as well. Fly in Wednesday lunch, check in, then on the ferry to Manly. If there is time will try and swing by Bondi too. We are planning on going to the Aqaurium one night.

Then two days for ColdFusion and web goodness for me while the family hits the Sydney town. Looking foward to catching up with CF buddies and finally get to meet Gert Franz.

After that it is off to the Blue Mountains for the weekend. Then one more look around Sydney before flying home Monday afternoon.

Posted by AJ Mercer at 2:37 pm - Categories: CFML | ColdFusion | Family Life | Railo

Jun 16 2008

New ColdFusion Podcast

Posted by Webonix at 8:57 pm - Categories: CFML | CFUGWA | ColdFusion | Railo

Jun 13 2008

webDU 2008 :: Day 1

All checked in and ready for be dazzled ...

 Nectarine show off past movies.

Keynote:

 Actually, there is just too much to blog...

..and there is a party to go too

Will write up later

Posted by Webonix at 9:03 pm - Categories: CFML

Jun 11 2008

webDU 2008 :: Day 0

AJM @ Sydney

Arrived in Sydney at 7am, trained to Darling Harbour to check in, walked to Circular Quay and finally forfilled a mission I set 10 years ago - caught the ferry to Manly and had brunch.

Then back on the ferry, then a train to Adobe HQ for a User Group meeting.

Next, Code Wars; but not before a shower that I think me team mates will appreciate.

Posted by Webonix at 9:05 pm - Categories: CFML

Jun 10 2008

Adam Lehman on Railo Open Source

I was very keen to see what Adam Lehman had to say about Railo's announcement about going Open Source and joining forces with jboss.org after has scathing attack on New Atlanta for their openBD product.

I was actually surprised, and delighted by what I read. From what I have read, Adam has personal issues with New Atlanta, which may have had a lot to do with the tone of his blog entry. But in this blog he says Railo are doing it for the right reasons and have choosen the better licence. Perhaps we can read into that - less threatening for Adobe?? Maybe Railo have been more open with their intentions; I know Gert was keen to talk to Adobe before the big announcement

There is a little confusion about what Railo will do with their Enterprise product. From may chats with Gert, I was under the impression that they would still be selling this version. I am sure Railo will clarify this shortly.

He also makes a good point about the partnership with Redhat - will Railo be tied to Jboss?
Just as Adobe's CF8 is branching out to more J2EE Application Servers, is Railo aligning itself with one?

From my point of view, a huge fan of CFML - it is all good

Posted by Webonix at 9:07 pm - Categories: CFML | ColdFusion | Railo