Thanks for jumping on this Josh. I was working on this project in January,
2008 -- Right before you joined Adobe. Or, I would have asked for your help.
Also, I'm sorry if I accidentally misled anyone!
Your comments helped me clarify what I originally intended to say:
I love ColdFusion because it makes a lot of things easy -- Especially
compared with Java, .Net, etc. And, I think highly of Adobe, and may
sometimes expect a bit too much from the company.
I'm a business guy first, and when I heard about the PDF functions in CF8, I
got really excited. I had an immediate application for the managing PDFs
with CF. I have a client who licenses some specialized human
resource-related forms. Companies buy a license to use the forms for one or
more years. The problem was there was no way to make the forms expire when
the license was up.
So, I thought I could use CF8 to embed the expiration date in a hidden
field. As long as the form had not expired, it could be emailed, printed,
etc -- Just like normal. But, after it expired, I would pop up an ugly
Expired notice. Also, I wanted to put who the form was licensed to and the
expiration date in the footer. All this data would vary from user to user,
so it was great to use CF to dynamically populate the information. I know it
is possible to defeat this scheme, but I thought it was good enough since
the target customer was HR.
Overall, this didn't seem like an exotic set of requirements. I would need
to write a little bit of Javascript inside the PDF to check if the date was
expired, but this didn't seem that hard. Ultimately, I did make this work,
but my experience was that it was VERY difficult. Then, a month after I got
it working and deployed, the bug I wrote about before showed up. This was
very frustrating.
To be fair, ColdFusion might have been the least challenging part. But, in a
lot of real world business applications, you have to use a PDF creation tool
like Acrobat/LiveCycle Designer to create your PDF. Then, use CF to add the
dynamic stuff. The combination of these tools along with the documentation
just didn't work very well for me. I'm sure it was partly my learning curve
and gaps in my development skills, but trying to sort through Acroform
documentation, XFA documentation, LiveCycle stuff, and ColdFusion was just
plain confusing. I expected a LOT more from Adobe. The bug I wrote about
before was not the only thing that gave me trouble. It was just the last
one.
I'm sure Adobe is working to make all of this much more seamless and more
useful.
One more thing. The server this is running on is Windows, so it is not
Linux-only. I'll notify Host My Site to see if they will install the HotFix,
and I'll let you know what happens.
Clarke
_____
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams
Sent: Friday, August 08, 2008 3:40 AM
To: [email protected]
Subject: RE: [ACFUG Discuss] My CF & PDF Challenges
Better news: there is a hotfix available for this issue now. Have your
host contact Support in regards to issue 71975.
Josh
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams
Sent: Thursday, August 07, 2008 11:31 PM
To: [email protected]
Subject: RE: [ACFUG Discuss] My CF & PDF Challenges
I have just learned that the bug encountered by Clarke has only been found
on Linux (and again, only when sandbox security is on) and that the target
for the fix is the next full release of ColdFusion.
Josh
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams
Sent: Thursday, August 07, 2008 11:26 PM
To: [email protected]
Subject: RE: [ACFUG Discuss] My CF & PDF Challenges
WARNING: long, long, long post. J
Well, Clarke-I do hope that you'll be helped by the presentation. And I'll
try to help you further here and if you have more, don't hesitate to ask!
But in terms of getting anything to the right people at Adobe: as you'll
see, at this point I don't think there's anything about which that needs to
be done.
For those who don't know Clarke, he's a great guy and you should come to the
ACFUG and AFFUG meeting and get to know him. I've had the pleasure of
knowing Clarke for years and I know him plenty well enough to know that he
doesn't mean to be distributing misinformation; I know that him distributing
misinformation here is just the unfortunate result of the way in which he
described his issues. But it is nevertheless misinformation: I can assure
you that working with PDFs in ColdFusion is in fact easy as you would expect
it to be. Let me explain:
Manipulating PDFs in CF is as simple as using the <cfpdf> tag. The <cfpdf>
tag allows you to easily perform a number of operations on PDFs that include
adding a watermark, merging pages from multiple PDFs into a new PDF,
creating a thumbnail of the PDF, encrypting & password-protecting, deleting
pages, reading metadata, and many more.
But there is even more great news: if the <cfpdf> tag does not directly
allow you to perform the PDF manipulation you want to perform, you can use
DDX. DDX is the language for PDF and having it available in CF is very
exciting because there is a lot you can do with DDX and it has previously
been available only in Adobe LiveCycle (and, I should note, the DDX support
in LiveCycle remains broader than in CF as noted in the
<http://livedocs.adobe.com/coldfusion/8/Tags_p-q_02.html> <cfpdf> section of
the ColdFusion 8 LiveDocs). But using DDX does require that you understand
DDX, so in that sense, it's not as easy as just using the <cfpdf> tag alone.
As Clarke notes, he's using DDX. Clarke has to use DDX because he wanted to
put a footer on his PDF and that isn't something that you can do with the
<cfpdf> tag. The result then is that while you can put a footer on a PDF
document with CF because CF allows you to do so via DDX, it isn't as easy as
is say putting a watermark on a document. Now, we could have just said "you
want to put a footer on a PDF with CF? Too bad-not supported" but isn't it
better that we instead opted to give you access to DDX?
The point I'm trying to drive home here is that there is a lot you can do in
terms of PDF manipulation that is not at all hard but that if you are
willing to take on a bit more work, there is even more you can do with DDX.
Clarke was willing to take on that work and thus his statement that it was
hard is reasonable; I'm just making the point that it's not a good blanket
statement. If the manipulations you want to do to PDFs are part of the
large set of manipulations directly supported by the <cfpdf> tag, you will
not find it to be hard to write the code required to make those
manipulations.
Now, Clarke, you say "these functions don't work well." Would you please
expound on that? When you say "functions," what do you mean? Do you mean
the <cfpdf> tag? Apart from this one particular issue you're having on one
particular server, is there something else that you have had problems with?
Clarke, you said we should warn people about CF functions that are
recommended unless you have a dedicated server. However, I am not aware of
any issues with ColdFusion that arise only on shared servers. So to my
understanding, we don't warn people about CF functions (or tags) that are
not recommended unless you have a dedicated server because there are no such
functions (or tags) (note that here I am specifically steering clear of the
issue of security, or the lack thereof, in a shared hosting environment).
However, as appears to be the case here, the occasional bug may arise in the
situation where sandbox security is in use, and typically sandbox security
is only used in shared hosting situations. For more check out this blog
post and the comment that goes with it:
http://www.shlomygantz.com/blog/index.cfm/2008/4/5/CFPDFprocessDDX-problems-
with-sandbox-security
I have a ping out internally to get some info on the status of the issue.
As for the CPU-intensiveness of some of the manipulations: I personally
haven't seen that, but maybe I haven't tried the manipulations you have seen
this issue on-I'll be interested in any further information you can provide.
But in any event, processing takes processing power; if there's an
alternative that does a better job please let me know and I'll see if I can
find out what gives here. Otherwise, I think we just have to say this just
is how it is.
The final point in Clarke's email is in regards to Adobe Acrobat and Adobe
LiveCycle Designer, not ColdFusion. I'm sorry to hear of your bad
experience with those two products, Clarke-the good news is that PDF is now
an open standard so you can always use a 3rd party tool of your liking. As
I mentioned in my presentation, there are two different types of PDF forms:
XFAs and Acroforms. XFAs are produced by LiveCycle Designer whereas
Acroforms are produced by Acrobat-knowing that, you can understand why forms
produced by one product don't necessarily work well with the other product.
The good news is that ColdFusion can work with not just one or the other
type of form, but both types of form!
Josh
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clarke Bishop
Sent: Thursday, August 07, 2008 4:04 PM
To: [email protected]
Subject: [ACFUG Discuss] My CF & PDF Challenges
I'm going to watch Josh's presentation via Connect as I couldn't attend the
meeting last night.
But, with all the interest in this topic, I thought I should share my
experiences. I was really excited about the new PDF stuff in CF8 as I had an
immediate need. I jumped in with both feet last fall and it was a lot harder
than I thought it should be, but I finally got things working.
But ...
1. These functions don't work well and sometimes not at all on a shared
host. I posted a test page at http://www.resultantsys.com/formprint to show
you what I mean.
Now, I know I'm not that great at CFML, but this is a pretty simple page. It
does use the more complex ProcessDDX. But, all it does is put a footer at
the bottom of the page.
It works perfectly on my development machine. But, on the shared host, it
fails with an ugly error. It did work for a month or two on the shared host,
but not for the last 6 months.
I think Adobe should warn people about CF functions that are not recommended
unless you have a dedicated server.
2. Some of the CF PDF functions are very CPU-intensive. Also, not good on a
shared server.
3. The tools to create PDFs with fields that can be populated and data that
can be extracted are very hard to use. Adobe did come out with an update,
but I haven't upgraded yet. So, this may be better now. But Acrobat Pro and
Livecycle Designer are very inconsistent and do not work well together.
Also, there are different DOM and programming models. It's like trying to
develop a cross-platform AJAX application for two browsers that have almost
nothing in common.
Anyway, I didn't mean to just vent. But, I did want to warn you about some
of the pitfalls.
And, I'm hoping that Josh can show me how to make this work or get it to the
right people at Adobe!
Clarke
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------