cfpdfform

297 views
Skip to first unread message

Ryan Hinton

unread,
Apr 24, 2015, 12:42:53 PM4/24/15
to lu...@googlegroups.com
I have been attempting to pitch to my new company the idea of switching from ACF to LCF.
The drawback to what my company needs heavily is cfpdfform.

I did some research in the Railo Google history (https://groups.google.com/forum/#!topic/railo/npqhUfUxd6k) and found a couple of strings back in 2011/2012 that cfpdfform is in the plan for Railo 4.  However, I don't see it in Railo or Lucee and of course the documentation shows that it is unsupported.  Therefore, will this be able to be a part of the collection of tag and script functions available to us in Lucee in the near future or is it no longer in the scope of functions to add to Lucee?

This will help us determine which direction we will take in choosing either ACF or LCF.

Thank you for your time,
Ryan Hinton

Sean Corfield

unread,
Apr 24, 2015, 2:17:53 PM4/24/15
to lu...@googlegroups.com
One thing you might consider is a single ACF server that does all your PDF processing and the rest of your servers being Lucee, and make web service/REST calls to ACF to get the PDFs you need.

Based on what I’ve seen discussed with PDF stuff in Railo over the years, I’d say the only way it’ll get added is if someone pays for the feature to be built (a one-off payment to LAS, as opposed to ongoing license fees to Adobe).

Sean

Ryan Hinton

unread,
Apr 24, 2015, 4:13:28 PM4/24/15
to lu...@googlegroups.com
Hi Sean,

Thank you for your feedback.  Having ACF handle PDFs is a great alternative solution. 

It is, however, unfortunate in understanding that Lucee cannot match the functionality of ACF 100%.  Following the discussions referenced to this topic in my previous post and seeing the topic dating back to 2011/2012, it almost seems like there was intention but no will to finish off all of the ACF functions available.  I guess I would have to ask whether or not every function available to us in Lucee (then Railo) was bought by a customer in this case.  If this is the case, then I understand, but if not every function has been bought, then why would the decision have been made to stop the development of finishing off the available functions in the effort to completely cover 100% of the functions that ACF offers?  It seems like it would be an added selling point for LCF to shore up limitations in the effort to reduce the insecurities (the cons of LCF) of companies deciding to go with LCF.

Perfect alternative solution, though, Sean.  Thank you, again, for your solution.

Regards,
Ryan Hinton

Andrew Dixon

unread,
Apr 24, 2015, 5:55:40 PM4/24/15
to lu...@googlegroups.com
Hi Ryan,

I don't think Railo and now Lucee have ever said they want to make a 100% ACF compatible solution and you have to remember that both Lucee and previously Railo are free open source software, and as such rely heavily on the community to provide, often at no cost, their time and effort to add functionality to it. There is nothing stopping yourself, your developer colleagues, your company, etc.. looking into making this function yourself maybe utilising another open source project like PDFBox (https://pdfbox.apache.org/), or like Sean says sponsoring it to be added instead of spending that money on an Adobe ACF license and maintenance contract.

At the moment there is really only 2 core developers on the Lucee project, Micha and Igal, and I believe Micha said in another post recently that neither himself or Igal have been paid anything, not a cent (I believe were his words), by the Lucee Association since it's foundation in January. They only have so much "free" time they can give to the project and therefore have to pick their battles and therefore I'm assuming the "cost" (time) benefit of adding cfpdfform for what is probably the very few people that use it simply hasn't seemed like a good use of their resources. These guys, after all have to put time into paying work to put food on the table like the rest of us, so why not contact Rasia (http://www.rasia.ch) who provide the "sponsored developments" and see if adding cfpdfform would cost you less than paying Adobe for the CF11 licenses?

Also for 100% compatibility they would have to be adding in all the non-sense that Adobe put in, like cfclient, and again I believe that they already said, back in the Railo days, that would never happen.

Kind regards,

Andrew
about.me
mso - Lucee - Member

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/460959e6-2824-4ef2-b089-13c7345caaff%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Adam Cameron

unread,
Apr 24, 2015, 6:06:53 PM4/24/15
to lu...@googlegroups.com


On Friday, 24 April 2015 22:55:40 UTC+1, Andrew Dixon wrote:
Also for 100% compatibility they would have to be adding in all the non-sense that Adobe put in, like cfclient,

I can't really commit to Lucee until it has 100% compatibility with <cfclient>. Surely this is the primary burning issue for most people here?

-- 
Adam 

Andrew Dixon

unread,
Apr 24, 2015, 8:27:58 PM4/24/15
to lu...@googlegroups.com
Maybe you could set up a kickstarter for it and crowd source the required funding? :-)

Kind regards,

Andrew
about.me
mso - Lucee - Member

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Kai Koenig

unread,
Apr 24, 2015, 8:29:31 PM4/24/15
to lu...@googlegroups.com
Adam could discuss that on Twitter with @cfclient :)

Ryan Hinton

unread,
Apr 24, 2015, 10:20:36 PM4/24/15
to lu...@googlegroups.com
Hi Andrew,

Thank you for the great insight. My intention is not to seem as if I am ungrateful for something that is free. I was always under the assumption that these guys were making money through support and customizations of sorts. It bares the question of how this project can continue without funding of any kind.

As for funding the ability to add cfpdfform, I think it is a great idea and worth it for the community, however, I barely sold this company on the idea of converting to LCF because they are skeptical of open source, there is uncertainty and hesitation because it is new to them, I am new to the team mixing up the marbles and why would they confide in me 100%, and asking them to then pay for creating a function on top of their uncertainty would burst the bubble, I believe. I will also check into your alternative solution as well. Thank you for that.

IF there is a way I could help in Java to create functions for this community, I would. Unfortunately, I do not have much skill in Java.

Thanks, again.
Ryan Hinton

Kai Koenig

unread,
Apr 24, 2015, 10:34:00 PM4/24/15
to lu...@googlegroups.com
Just on another note re the technicalities of cfpdform.

If you were after full compatibility for those tags ACF adds sometimes for good reasons, sometimes for well… no apparent reason, cfpdfform is a particular tricky one.

There are essentially two types of forms in pdf containers - AcroForms and Adobe Livecycle Forms (also known as XFA forms). PDFBox deals well with AcroForms when it comes to setting and retrieving data from form fields, but there at least used to be a bunch of issues with it and XFA forms (which can be handled ok by newer versions of iText).

So, there are solutions out there you could probably integrate with Lucee/Railo reasonably easily with some Java knowledge (how to use Java libraries within a CFML context). Wrapping those into a direct cfpdfform tag is a different beast due to certain PDF libraries being able to do certain things well or not so well. The other issue is that some of the functionally in cfpdf and cfpdfform uses proprietory libraries from Adobe’s LC ES server technologies and therefore in some instances you won’t be able to achieve a 100% compatibility anyway.

Cheers
Kai
> --
> You received this message because you are subscribed to the Google Groups "Lucee" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
> To post to this group, send email to lu...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/56785d9f-9630-4408-bdd3-f9a726c557e0%40googlegroups.com.

denstar

unread,
Apr 24, 2015, 10:51:23 PM4/24/15
to lu...@googlegroups.com
I did a cfpdfform implementation for Ortus a while back, I'll ping the
guys about it.

-Den

Michael van Leest

unread,
Apr 24, 2015, 11:32:30 PM4/24/15
to lu...@googlegroups.com
@Adam You had me for a moment... I was reading half way and thought "Is this guy for real...?" Oh wait... Adam. :) Nice one.

@Ryan: I agree with Andrew. Some parts are more time consuming to build and don't forget, to maintain as well. If there is a strong demand from the community, I'm sure LAS will consider putting a feature on the roadmap. But for less requested stuff, like cfpdfform it's not worth the time comparing to other features/bugs need to be addressed.

In my opinion, asking a fee for such components is nothing but normal.

@Andrew: is it maybe an idea to have a funding section on the lucee site for specific functionalities (besides the support options)? So if requests come in for these kind of additions that they get funded (discussed and approved by the LAS committee)? (As LAS already has a stripe account, a basic crowdfunding app would be easy to setup). If this is something LAS wants to consider, I wouldn't mind taking this on and put something on paper for LAS to discuss.


Mike

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Michael van Leest

Seth Johnson

unread,
Apr 25, 2015, 12:24:03 AM4/25/15
to lu...@googlegroups.com
Not to hijack this thread, but I think that the idea of having a place where we can donate towards a specific implementations (like the pdf features) is a great idea.  

@Andrew FYI, the Paypal "Donate" button and it gives an error: This recipient is currently unable to receive money.  

+1 Michael

denstar

unread,
Apr 25, 2015, 12:55:58 AM4/25/15
to lu...@googlegroups.com
On 4/24/15 9:32 PM, Michael van Leest wrote:
> @Adam You had me for a moment... I was reading half way and thought "Is
> this guy for real...?" Oh wait... Adam. :) Nice one.

Seconded-- I'm a sucker for deadpan humor. :)

[...]
>
> In my opinion, asking a fee for such components is nothing but normal.

Especially considering that whatever is added needs to be supported
going forward.

> @Andrew: is it maybe an idea to have a funding section on the lucee site
> for specific functionalities (besides the support options)? So if
> requests come in for these kind of additions that they get funded
> (discussed and approved by the LAS committee)? (As LAS already has a
> stripe account, a basic crowdfunding app would be easy to setup). If
> this is something LAS wants to consider, I wouldn't mind taking this on
> and put something on paper for LAS to discuss.

I like that idea. LAS/The Committee could decide what it wants to take
on, where it thinks functionality belongs, etc., and we could put out
bounties or take bids or something as well.

-Den

Michael van Leest

unread,
Apr 25, 2015, 3:08:29 AM4/25/15
to lu...@googlegroups.com
If LAS/Committee would approve a enhancement or new feature, they could also divide the work in multiple goals (if it's a big project). 
Goals can be added in a ordered fashion ( Goal 1, than 2, 3 etc), or in a base and options fashion (Goal 1: core functionality, Option 1 Add X, Option 2 Add Y etc). 

This would give LAS more insight which functions the community sees as top priority. But also gives the community more information what's going on development wise (the move to JIRA would probably give more insight already once the move is complete).

Just thinking out loud... Comments? Ideas? Yea? Nay?

Mike

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Michael van Leest

denstar

unread,
Apr 25, 2015, 4:15:53 AM4/25/15
to lu...@googlegroups.com
Yes, I think the main thing would be deciding what features LAS wants to
support, and what would need to be community supported.

Anybody could contribute to community stuff, including LAS members, but
there wouldn't be an assumption that LAS itself was offering to support
feature/extension X going forward-- it would be up to the community.

Make it easy to see what people need and want, easy for people to
sponsor development, and easy for development to happen -- by LAS, other
groups, individuals, whatever -- above all, easy.

-Den

Ryan Hinton

unread,
Apr 25, 2015, 12:43:40 PM4/25/15
to lu...@googlegroups.com

Thank you all for great suggestions! Hopefully we can all get some momentum with not only this function but other functions and features that could help the community.

@Den, Do you know if cfpdfform is available in any of the box apps that are  offered by Ortus?  Maybe Coldbox?
Coldbox, Wirebox, Testbox and Commandbox are yet other new implementations I have introduced to this company, so they are chewing on all of these "new" technologies simultaneously.  lol

Where is it that we can donate? What is the link, even if it is not working right now.

Thanks, everyone! 

--
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/FH1WYhcxSQ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.

To post to this group, send email to lu...@googlegroups.com.

denstar

unread,
Apr 25, 2015, 1:42:52 PM4/25/15
to lu...@googlegroups.com
I think the idea might have been to make it a paid extension.

I pinged Luis about it, we'll see what he says.

One of the ideas with Lucee is to make it easy to purchase paid
extensions. Having "in-app" purchases, so to speak, seems like another
avenue we should support. We should make it easy for the people
offering the extensions to get them out to folks however they see fit.

Free, with an optional donation link, as well as paid-only (while still
allowing the author to choose on a case-by-case basis if she or he wants
to give it away to a particular person or group). For instance, if I
had a paid extension, and someone was like "I can't pay for it" (either
because of lack of funds or politics), I'd like to be able to say "well,
it's worth more to me to get you into CFML, so here ya go", or whatever.

We don't have the volume to make micro-sales very profitable, but even
say potentially having 50 people paying $5 each might be enough of an
incentive for someone to invest a couple hours in Nifty Extension X...

Anyways, we should keep stuff like that in mind as we come up with ways
to facilitate financial support of development for the language and
platform.

Maybe we could have bounties, crowd funding, and purchases all be part
of the "extension store" that is in the works. (Only name something
else.) Have it be super easy for both developers to produce and
populate, and consumers to consume and reciprocate.

Easy and powerful, like the language.

-Den

On 4/25/15 10:43 AM, Ryan Hinton wrote:
> Thank you all for great suggestions! Hopefully we can all get some
> momentum with not only this function but other functions and features
> that could help the community.
>
> @Den, Do you know if cfpdfform is available in any of the box apps that
> are offered by Ortus? Maybe Coldbox?
> Coldbox, Wirebox, Testbox and Commandbox are yet other new
> implementations I have introduced to this company, so they are chewing
> on all of these "new" technologies simultaneously. lol
>
> Where is it that we can donate? What is the link, even if it is not
> working right now.
>
> Thanks, everyone!
>
> On Apr 24, 2015 10:51 PM, "denstar" <vallia...@gmail.com
> <mailto:vallia...@gmail.com>> wrote:
>
> I did a cfpdfform implementation for Ortus a while back, I'll ping the
> guys about it.
>
> -Den
>
> --
> You received this message because you are subscribed to a topic in
> the Google Groups "Lucee" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/lucee/FH1WYhcxSQ8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> lucee+un...@googlegroups.com
> <mailto:lucee%2Bunsu...@googlegroups.com>.
> To post to this group, send email to lu...@googlegroups.com
> <mailto:lu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lucee/553B0127.3070008%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Lucee" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lucee+un...@googlegroups.com
> <mailto:lucee+un...@googlegroups.com>.
> To post to this group, send email to lu...@googlegroups.com
> <mailto:lu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lucee/CANsCO9rhmVxOnttLzSbBgaODu6sS%3D8_VCpG1Y4UnYo_%2BckP0dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/lucee/CANsCO9rhmVxOnttLzSbBgaODu6sS%3D8_VCpG1Y4UnYo_%2BckP0dg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

AJ Mercer

unread,
May 28, 2015, 7:37:12 AM5/28/15
to lu...@googlegroups.com
I have been messing with iText 5.5.6
and can get pdf form fields and field values,
and populate form fields to create new pdf

If some one can point me to some resources for Lucee 5 I will have a crack and creating a tag to wrap it up.

Things I would like to know
  • best way to handle 3rd party JARs
    • where to store them
    • loaded them into server scope?
    • ensure they JARs are easy to update
  • how to create a tag
  • how to create a script version of a tag
    • inc tag params eg cfpdfformparam
  • namespacing tags in Lucee 5 (dropping cf? appending l or lc??)
  • if the tag is not going to be compatible with ACF (all be it incomplete), should I give the tag a different name
    • may not be an issue if namespace is lc eg lcpdfform
  • creating extensions in Lucee 5

This is just enough to get me moving today, but if anyone can't wait for 'official' tag


com/itext/pdform.cfc
/* References / Thanks to
 **/
component {

VARIABLES.reader  = createObject("java","com.itextpdf.text.pdf.PdfReader",  "lib/itextpdf-5.5.6.jar");
VARIABLES.stamper = createObject("java","com.itextpdf.text.pdf.PdfStamper", "lib/itextpdf-5.5.6.jar");

public any function init()

{
VARIABLES.reader  = createObject("java","com.itextpdf.text.pdf.PdfReader",  "lib/itextpdf-5.5.6.jar");
VARIABLES.stamper = createObject("java","com.itextpdf.text.pdf.PdfStamper", "lib/itextpdf-5.5.6.jar");

return THIS;
}

public Struct function getFormFields
(
required string source
)
{

var stFormFields = structNew("linked");
var local = {};

local.pdf = VARIABLES.reader.init(ARGUMENTS.source);

local.pdfForm = local.pdf.getAcroFields();
local.stFields = pdfForm.getFields().keySet().iterator();

while (local.stFields.hasNext()) {
var fieldName = stFields.next();
stFormFields[fieldName] = pdfForm.getField(fieldName);
}

local.pdf.close();

return stFormFields

}

public boolean function setFormFields
(
required string source,
required string destination,
required struct stFormFields,
boolean overwrite = true
)
{
var local = {};

local.ok = true;

local.pdf = VARIABLES.reader.init(ARGUMENTS.source);

//local.writePDF = expandpath("#getTempDirectory()##createUUID()#.pdf");
local.fileIO   = createObject("java","java.io.FileOutputStream").init(ARGUMENTS.destination);

local.newPDF     = VARIABLES.stamper.init(local.pdf, local.fileIO);
local.pdfFormNew = local.newPDF.getAcroFields();

local.pdfForm = local.pdf.getAcroFields();
local.stFields = pdfForm.getFields().keySet().iterator();

// set field values
// TODO: loop through ARGUMENTS['stFormFields'] (for now this ensures all fields are passed in)
while (local.stFields.hasNext()) {
var fieldName = stFields.next();
local.pdfFormNew.setField(fieldName, ARGUMENTS['stFormFields'][fieldName]);
}

local.newPDF.setFormFlattening(true);

local.newPDF.close();
local.pdf.close();
local.fileIO.close();

//local.binaryFile = fileReadBinary(local.writePDF);
//fileDelete(local.writePDF);

return local.ok

}
}


using
<cfscript>
pdfFile = "#ExpandPath('.')#\your.pdf";
pdfForm = new com.itext.pdfform();

stFormFields = pdfForm.getFormFields(pdfFile);
dump(var=stFormFields, label= 'stFormFields');
</cfscript>


--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ryan Hinton

unread,
Jun 3, 2015, 4:25:54 PM6/3/15
to lu...@googlegroups.com
Wow!  Thank you for sharing, AJ!

I will look into this!

Thank you again,
Ryan Hinton


--
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/FH1WYhcxSQ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.

To post to this group, send email to lu...@googlegroups.com.

AJ Mercer

unread,
Jun 3, 2015, 6:52:51 PM6/3/15
to lu...@googlegroups.com

Arthur Blake

unread,
Jun 18, 2015, 7:13:48 AM6/18/15
to lu...@googlegroups.com
I like the idea. Unfortunately the iText license is GPL/toxic for my purposes (and I would think this would never work as part of core Lucee the same reason). Would like to see one based on pdfbox. The think I really need <cfpdf action="extracttext" ...>

Arthur Blake

unread,
Jun 18, 2015, 7:15:08 AM6/18/15
to lu...@googlegroups.com
I bungled my grammar in that last sentence - let me start over:

I really need "<cfpdf action="extracttext" ..." - For now I'll probably just shell out to java/pdfbox to get it done but would like to see it working in Lucee proper.

AJ Mercer

unread,
Jun 18, 2015, 7:36:57 AM6/18/15
to lu...@googlegroups.com
I have been struggling with pdfbox

if anyone has some working code they are willing to share I would be more than happy to update my tag


For more options, visit https://groups.google.com/d/optout.

Julian Halliwell

unread,
Jun 18, 2015, 7:41:58 AM6/18/15
to lu...@googlegroups.com
I'm using PDFBox for text extraction. An old version is actually
included in Lucee but I'd be cautious about using it as in some
circumstances it throws NPEs with extraction.

The latest version fixes the problem, so I'm calling it with JavaLoader.

Arthur Blake

unread,
Jun 18, 2015, 8:31:00 AM6/18/15
to lu...@googlegroups.com

On Thursday, June 18, 2015 at 7:41:58 AM UTC-4, Julian Halliwell wrote:
I'm using PDFBox for text extraction. An old version is actually
included in Lucee but I'd be cautious about using it as in some
circumstances it throws NPEs with extraction.

The latest version fixes the problem, so I'm calling it with JavaLoader.

 
I think that's a good approach. That's how I'm planning to do it as well. Care to share any code snippets? 

Julian Halliwell

unread,
Jun 18, 2015, 9:08:07 AM6/18/15
to lu...@googlegroups.com
Sure. I've added code to a blog post I wrote not long ago where I
discussed various PDF issues with Railo (as it was at the time).
You'll find it at the bottom of the post.

http://cfsimplicity.com/94/migrating-from-coldfusion-to-railo-part-7-pdfs
Reply all
Reply to author
Forward
0 new messages