Cfpdfform

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

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).

SeanOn Apr 24, 2015, at 9:42 AM, Ryan Hinton <@Ryan_Hinton1> wrote:

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.

@Adam You had me for a moment… I was reading half way and thought “Is
this guy for real…?” Oh wait… Adam. :slight_smile: 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.

Mike2015-04-25 2:31 GMT+02:00 Kai Koenig <@Kai_Koenig>:

Adam could discuss that on Twitter with @cfclient :slight_smile:

Maybe you could set up a kickstarter for it and crowd source the required
funding? :slight_smile:

Kind regards,

Andrew
about.me http://about.me/andrew_dixon
mso http://www.mso.net/ - Lucee http://lucee.org/ - 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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/8EBE3A25-810A-40B5-AD0C-CB5881769F28%40gmail.com
https://groups.google.com/d/msgid/lucee/8EBE3A25-810A-40B5-AD0C-CB5881769F28%40gmail.com?utm_medium=email&utm_source=footer
.

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


Michael van Leest

@Adam You had me for a moment… I was reading half way and thought “Is
this guy for real…?” Oh wait… Adam. :slight_smile: Nice one.

Seconded-- I’m a sucker for deadpan humor. :slight_smile:

[…]

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.

-DenOn 4/24/15 9:32 PM, Michael van Leest wrote:

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> 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


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/56785d9f-9630-4408-bdd3-f9a726c557e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I did a cfpdfform implementation for Ortus a while back, I’ll ping the
guys about it.

-Den

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

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 MichaelOn Fri, Apr 24, 2015 at 11:32 PM, Michael van Leest <@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. :slight_smile: 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

2015-04-25 2:31 GMT+02:00 Kai Koenig <@Kai_Koenig>:

Adam could discuss that on Twitter with @cfclient :slight_smile:

Maybe you could set up a kickstarter for it and crowd source the required
funding? :slight_smile:

Kind regards,

Andrew
about.me http://about.me/andrew_dixon
mso http://www.mso.net/ - Lucee http://lucee.org/ - 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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/8EBE3A25-810A-40B5-AD0C-CB5881769F28%40gmail.com
https://groups.google.com/d/msgid/lucee/8EBE3A25-810A-40B5-AD0C-CB5881769F28%40gmail.com?utm_medium=email&utm_source=footer
.

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


Michael van Leest


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAMaJE6tUvNh8%2BUvRrJxbcv-OLeFbEy9os2-qRMRhtcNvFds9Bg%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAMaJE6tUvNh8%2BUvRrJxbcv-OLeFbEy9os2-qRMRhtcNvFds9Bg%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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

Adam could discuss that on Twitter with @cfclient :)> Maybe you could set up a kickstarter for it and crowd source the required funding? :slight_smile:

Kind regards,

Andrew
about.me
mso - Lucee - Member

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?

Mike2015-04-25 6:55 GMT+02:00 denstar <@denstar>:

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. :slight_smile: Nice one.

Seconded-- I’m a sucker for deadpan humor. :slight_smile:

[…]

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


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/553B1E5A.1080709%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Michael van Leest

Maybe you could set up a kickstarter for it and crowd source the required
funding? :slight_smile:

Kind regards,

Andrew
about.me http://about.me/andrew_dixon
mso http://www.mso.net - Lucee http://lucee.org - MemberOn 24 April 2015 at 23:06, Adam Cameron <@Adam_Cameron> wrote:

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
. Surely this is the primary burning issue for most people here?


Adam


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/83a2547a-affe-4b03-8f6e-39f97a325ab7%40googlegroups.com
https://groups.google.com/d/msgid/lucee/83a2547a-affe-4b03-8f6e-39f97a325ab7%40googlegroups.com?utm_medium=email&utm_source=footer
.

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

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” <@denstar> 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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@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.

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*
http://talltroym.blogspot.com.au/2012/07/displaying-pdf-form-fields-using-itext.html

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

pdfFile = “#ExpandPath(’.’)#\your.pdf”;
pdfForm = new com.itext.pdfform();

stFormFields = pdfForm.getFormFields(pdfFile);
dump(var=stFormFields, label= ‘stFormFields’);

On 25 April 2015 at 00:42, Ryan Hinton <@Ryan_Hinton1> wrote:

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


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix

1 Like

started putting it all together here
https://github.com/webonix/lucee-cfpdfformOn 4 June 2015 at 04:25, Ryan Hinton <@Ryan_Hinton1> wrote:

Wow! Thank you for sharing, AJ!

I will look into this!

Thank you again,
Ryan Hinton

On Thu, May 28, 2015 at 7:37 AM, AJ Mercer <@AJ_Mercer> wrote:

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
*
http://talltroym.blogspot.com.au/2012/07/displaying-pdf-form-fields-using-itext.html

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

pdfFile = “#ExpandPath(’.’)#\your.pdf”;
pdfForm = new com.itext.pdfform();

stFormFields = pdfForm.getFormFields(pdfFile);
dump(var=stFormFields, label= ‘stFormFields’);

On 25 April 2015 at 00:42, Ryan Hinton <@Ryan_Hinton1> wrote:

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


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CANsCO9o8O1h01_zMdJaUZDfGDw8GwuA1Y6hE%2B7fKkui265rtbQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CANsCO9o8O1h01_zMdJaUZDfGDw8GwuA1Y6hE%2B7fKkui265rtbQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix

Wow! Thank you for sharing, AJ!

I will look into this!

Thank you again,
Ryan HintonOn Thu, May 28, 2015 at 7:37 AM, AJ Mercer <@AJ_Mercer> wrote:

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
*
http://talltroym.blogspot.com.au/2012/07/displaying-pdf-form-fields-using-itext.html

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

pdfFile = “#ExpandPath(’.’)#\your.pdf”;
pdfForm = new com.itext.pdfform();

stFormFields = pdfForm.getFormFields(pdfFile);
dump(var=stFormFields, label= ‘stFormFields’);

On 25 April 2015 at 00:42, Ryan Hinton <@Ryan_Hinton1> wrote:

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


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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

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” …>On Wednesday, June 3, 2015 at 6:52:51 PM UTC-4, AJ Mercer wrote:

started putting it all together here
https://github.com/webonix/lucee-cfpdfform

On 4 June 2015 at 04:25, Ryan Hinton <ryan....@gmail.com <javascript:>> wrote:

Wow! Thank you for sharing, AJ!

I will look into this!

Thank you again,
Ryan Hinton

On Thu, May 28, 2015 at 7:37 AM, AJ Mercer <ajme...@gmail.com <javascript:>> wrote:

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
*
http://talltroym.blogspot.com.au/2012/07/displaying-pdf-form-fields-using-itext.html

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

pdfFile = “#ExpandPath(’.’)#\your.pdf”;
pdfForm = new com.itext.pdfform();

stFormFields = pdfForm.getFormFields(pdfFile);
dump(var=stFormFields, label= ‘stFormFields’);

On 25 April 2015 at 00:42, Ryan Hinton <ryan....@gmail.com <javascript:> wrote:

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


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CANsCO9o8O1h01_zMdJaUZDfGDw8GwuA1Y6hE%2B7fKkui265rtbQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CANsCO9o8O1h01_zMdJaUZDfGDw8GwuA1Y6hE%2B7fKkui265rtbQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix

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.On 18 June 2015 at 12:15, Arthur Blake <@Arthur_Blake> wrote:

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.

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-pdfsOn 18 June 2015 at 13:31, Arthur Blake <@Arthur_Blake> wrote:

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

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 tagOn 18 June 2015 at 19:15, Arthur Blake <@Arthur_Blake> wrote:

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.

On Thursday, June 18, 2015 at 7:13:48 AM UTC-4, Arthur Blake wrote:

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” …>

On Wednesday, June 3, 2015 at 6:52:51 PM UTC-4, AJ Mercer wrote:

started putting it all together here
https://github.com/webonix/lucee-cfpdfform

On 4 June 2015 at 04:25, Ryan Hinton ryan....@gmail.com wrote:

Wow! Thank you for sharing, AJ!

I will look into this!

Thank you again,
Ryan Hinton

On Thu, May 28, 2015 at 7:37 AM, AJ Mercer ajme...@gmail.com wrote:

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
*
http://talltroym.blogspot.com.au/2012/07/displaying-pdf-form-fields-using-itext.html

https://github.com/getrailo/railo/wiki/Tutorial--Using-Java-in-Railo
**/
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

pdfFile = “#ExpandPath(’.’)#\your.pdf”;
pdfForm = new com.itext.pdfform();

stFormFields = pdfForm.getFormFields(pdfFile);
dump(var=stFormFields, label= ‘stFormFields’);

On 25 April 2015 at 00:42, Ryan Hinton ryan....@gmail.com wrote:

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


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
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix


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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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.
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/CANsCO9o8O1h01_zMdJaUZDfGDw8GwuA1Y6hE%2B7fKkui265rtbQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CANsCO9o8O1h01_zMdJaUZDfGDw8GwuA1Y6hE%2B7fKkui265rtbQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/469e034a-0cc0-4122-a99d-d34dacab4b77%40googlegroups.com
https://groups.google.com/d/msgid/lucee/469e034a-0cc0-4122-a99d-d34dacab4b77%40googlegroups.com?utm_medium=email&utm_source=footer
.

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

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix

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.On Thursday, June 18, 2015 at 7:13:48 AM UTC-4, Arthur Blake wrote:

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” …>

On Wednesday, June 3, 2015 at 6:52:51 PM UTC-4, AJ Mercer wrote:

started putting it all together here
https://github.com/webonix/lucee-cfpdfform

On 4 June 2015 at 04:25, Ryan Hinton ryan....@gmail.com wrote:

Wow! Thank you for sharing, AJ!

I will look into this!

Thank you again,
Ryan Hinton

On Thu, May 28, 2015 at 7:37 AM, AJ Mercer ajme...@gmail.com wrote:

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
*
http://talltroym.blogspot.com.au/2012/07/displaying-pdf-form-fields-using-itext.html

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

pdfFile = “#ExpandPath(’.’)#\your.pdf”;
pdfForm = new com.itext.pdfform();

stFormFields = pdfForm.getFormFields(pdfFile);
dump(var=stFormFields, label= ‘stFormFields’);

On 25 April 2015 at 00:42, Ryan Hinton ryan....@gmail.com wrote:

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


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
https://groups.google.com/d/msgid/lucee/9d5ed586-acd1-4cb9-974d-865a90d968fa%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix


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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAPURtC37DH9pHSPEKWPB0i1jez-9Cche%2By1fv9-4guZj2vpaeQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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.
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/CANsCO9o8O1h01_zMdJaUZDfGDw8GwuA1Y6hE%2B7fKkui265rtbQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CANsCO9o8O1h01_zMdJaUZDfGDw8GwuA1Y6hE%2B7fKkui265rtbQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

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

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix