Creating a PDF document with signature

234 views
Skip to first unread message

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 7:10:16 AM4/22/13
to ColdFusion Technical Talk

I am creating a PDF document on the fly and need to know how to place a digital signature block on the document. Is this possible using cfdocument/cfpdf?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355520

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 9:57:23 AM4/22/13
to ColdFusion Technical Talk

> I am creating a PDF document on the fly and need to know how to place a digital signature block on the document.
> Is this possible using cfdocument/cfpdf?

No, I don't think it is. However, you can create a document that has
nothing but a digital signature field and appropriate markup, and you
can splice two documents together with CFDOCUMENT or CFPDF (I forget
which).

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355521

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 9:58:41 AM4/22/13
to ColdFusion Technical Talk

> > I am creating a PDF document on the fly and need to know how to place a digital signature block on the document.
> > Is this possible using cfdocument/cfpdf?
>
> No, I don't think it is. However, you can create a document that has
> nothing but a digital signature field and appropriate markup, and you
> can splice two documents together with CFDOCUMENT or CFPDF (I forget
> which).

I might not have made it clear enough: you'll have to create the form
with the digital signature field in LC Designer. You can then merge
the form with your other generated document using CF.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355522

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 10:00:16 AM4/22/13
to ColdFusion Technical Talk

> I might not have made it clear enough: you'll have to create the form
> with the digital signature field in LC Designer. You can then merge
> the form with your other generated document using CF.
>

OK. That is what I was just about to try. Thanks

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355523

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 10:30:29 AM4/22/13
to ColdFusion Technical Talk

>> I might not have made it clear enough: you'll have to create the form
>> with the digital signature field in LC Designer. You can then merge
>> the form with your other generated document using CF.
>>
I have installed LiveCycle designer. Do I just use the signature field? The signature will be from a CAC card.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355524

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 10:41:27 AM4/22/13
to ColdFusion Technical Talk

> I have installed LiveCycle designer. Do I just use the signature field? The signature will be from a CAC card.

Yes, that's it.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355526

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 10:48:45 AM4/22/13
to ColdFusion Technical Talk

> > I have installed LiveCycle designer. Do I just use the signature
> field? The signature will be from a CAC card.
>
> Yes, that's it.
>
OK. It seems I need to change some security setting on the form since it says "You cannot save data typed in this form." I'll have to play with it. This is the first time I've used LiveCycle.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355527

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 11:16:55 AM4/22/13
to ColdFusion Technical Talk

> OK. It seems I need to change some security setting on the form since it says "You cannot save data
> typed in this form." I'll have to play with it. This is the first time I've used LiveCycle.

If this document was originally created in Acrobat, and you open it in
Reader, you will see this message by default. If you want Reader users
to save data, you'll need to use Reader Extensions to Reader-enable
the form. You can do this from within Acrobat (not LC Designer).

All that said, if you're going to put it on your web site and have
people fill it out and submit back to your web site, Reader users
won't need to save data - you'll just need to make sure you have a
submit button that points to a URL on your server.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355528

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 12:06:54 PM4/22/13
to ColdFusion Technical Talk

> If this document was originally created in Acrobat, and you open it
> in
> Reader, you will see this message by default. If you want Reader
> users
> to save data, you'll need to use Reader Extensions to Reader-enable
> the form. You can do this from within Acrobat (not LC Designer).
>
> All that said, if you're going to put it on your web site and have
> people fill it out and submit back to your web site, Reader users
> won't need to save data - you'll just need to make sure you have a
> submit button that points to a URL on your server.
>

This is the message that I see when I created a new PDF in LiveCycle designer with the signature field

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355530

hofar...@houseoffusion.com

unread,
Apr 22, 2013, 12:16:35 PM4/22/13
to ColdFusion Technical Talk

> > If this document was originally created in Acrobat, and you open it
> > in Reader, you will see this message by default. If you want Reader
> > users to save data, you'll need to use Reader Extensions to Reader-enable
> > the form. You can do this from within Acrobat (not LC Designer).
>
> > All that said, if you're going to put it on your web site and have
> > people fill it out and submit back to your web site, Reader users
> > won't need to save data - you'll just need to make sure you have a
> > submit button that points to a URL on your server.
>
> This is the message that I see when I created a new PDF in LiveCycle designer with the signature field

Right, because you're opening it up in Reader. If Reader is your
default PDF viewer, and you use the Preview PDF tab in LC Designer,
you'll get that message. You need to open it in Acrobat and enable
Reader Extensions. Again, though, if it's just for online users to
complete and submit, you don't have to worry about this.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355531

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 10:45:39 AM4/24/13
to ColdFusion Technical Talk

> I am creating a PDF document on the fly and need to know how to place
> a digital signature block on the document. Is this possible using
> cfdocument/cfpdf?

Anyone ever use iText directly to manipulate PDFs in CF10? I can merge a PDF document with a dig signature, but cannot insert the signature where I want it to go on my generated PDF using CFPDF.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355575

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 11:33:45 AM4/24/13
to ColdFusion Technical Talk

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 11:45:51 AM4/24/13
to ColdFusion Technical Talk

> Anyone ever use iText directly to manipulate PDFs in CF10? I can merge a PDF document with a dig signature,
> but cannot insert the signature where I want it to go on my generated PDF using CFPDF.

I don't think you can use iText to manipulate LC Designer forms. PDFs
that you create with Designer are not the same as "regular" PDFs -
they're a different format called XFA.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355577

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 12:05:17 PM4/24/13
to ColdFusion Technical Talk

> I don't think you can use iText to manipulate LC Designer forms. PDFs
> that you create with Designer are not the same as "regular" PDFs -
> they're a different format called XFA.
>

Right, I could not even merge a LiveCycle generated PDF with the PDF which I was generating with cfdocument. I had to use Acrobat 9 to create my PDF with the digital signature so I could get it to merge with the other PDF. This doesn't satisfy the requirement though since the signature needs to be embedded into the dynamic PDF above a persons name. This is why I was thinking if there was a way to use cfscripting to try to place a signature into the dynamic PDF.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355578

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 12:09:54 PM4/24/13
to ColdFusion Technical Talk

> > I don't think you can use iText to manipulate LC Designer forms. PDFs
> > that you create with Designer are not the same as "regular" PDFs -
> > they're a different format called XFA.
>
> Right, I could not even merge a LiveCycle generated PDF with the PDF which I was generating with cfdocument. I had to
> use Acrobat 9 to create my PDF with the digital signature so I could get it to merge with the other PDF. This doesn't satisfy
> the requirement though since the signature needs to be embedded into the dynamic PDF above a persons name. This is why
> I was thinking if there was a way to use cfscripting to try to place a signature into the dynamic PDF.

Why not create the PDF in LC Designer, and make the person's name a
form field that you can easily manipulate from CF using CFPDFFORM?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355579

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 12:42:43 PM4/24/13
to ColdFusion Technical Talk

> Why not create the PDF in LC Designer, and make the person's name a
> form field that you can easily manipulate from CF using CFPDFFORM?
>

Hmm.. how about all of the other data on the PDF which comes from the database? The data can't appear as form fields on the PDF.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355580

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 12:45:32 PM4/24/13
to ColdFusion Technical Talk

> > Why not create the PDF in LC Designer, and make the person's name a
> > form field that you can easily manipulate from CF using CFPDFFORM?
>
> Hmm.. how about all of the other data on the PDF which comes from the database? The data can't appear as
> form fields on the PDF.

Form fields don't have to look like form fields, or be editable by the user.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355581

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 12:47:16 PM4/24/13
to ColdFusion Technical Talk

> Form fields don't have to look like form fields, or be editable by the
> user.
>

I'll give it a try. Thanks

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355582

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 1:49:36 PM4/24/13
to ColdFusion Technical Talk

On 4/24/2013 10:45 PM, Dave Watts wrote:

> I don't think you can use iText to manipulate LC Designer forms. PDFs
> that you create with Designer are not the same as "regular" PDFs -
> they're a different format called XFA.

actually...iText handles XFA forms just fine. flattening them to PDF is another
issue but if you don't mind paying for support, bruno et al have a solution:

http://demo.itextsupport.com/xfademo/uploadpdf.jsp
http://lowagie.com/xfabpm




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355583

hofar...@houseoffusion.com

unread,
Apr 24, 2013, 10:05:21 PM4/24/13
to ColdFusion Technical Talk

>> Form fields don't have to look like form fields, or be editable by the
>> user.
>>
>

Got it working! Created the PDF form in LiveCycle, then add data in with cfpdfform. Then run cfpdf on it to flatten it after data was added while still maintaining the signature fields. Then merged with another form which was created on the fly.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355584

hofar...@houseoffusion.com

unread,
Apr 25, 2013, 4:21:25 PM4/25/13
to ColdFusion Technical Talk

So now I am having an issue with digitally signing in Adobe Reader. I can sign it if I open the document with Acrobat. I already enabled usage rights in Acrobat on the documents and saved them. After I use cfpdfform to populate the form, I have:

<cfpdf action="write" source="#commFileSpec#" destination="#commFileSpec#" flatten="yes" overwrite="yes" saveOption="incremental">

Which I used to disable the fields from being changed by the user while still maintaining the digital signature box. Am I doing something wrong?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355594

hofar...@houseoffusion.com

unread,
Apr 25, 2013, 10:36:17 PM4/25/13
to ColdFusion Technical Talk

> So now I am having an issue with digitally signing in Adobe Reader. I can sign it if I open the document with Acrobat. I already
> enabled usage rights in Acrobat on the documents and saved them. After I use cfpdfform to populate the form, I have:
>
> <cfpdf action="write" source="#commFileSpec#" destination="#commFileSpec#" flatten="yes" overwrite="yes"
> saveOption="incremental">
>
> Which I used to disable the fields from being changed by the user while still maintaining the digital signature box. Am I doing
> something wrong?

I don't think you can flatten the form and expect Reader users to be
able to use any of the fields. I was suggesting earlier that you make
the other fields non-editable in LC Designer rather than flatten the
form.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355597

hofar...@houseoffusion.com

unread,
Apr 26, 2013, 7:41:14 AM4/26/13
to ColdFusion Technical Talk

Are there any other ways to "merge" two PDFs w/forms without having to use cfpdf action="merge" ?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355602

hofar...@houseoffusion.com

unread,
Apr 26, 2013, 8:00:41 AM4/26/13
to ColdFusion Technical Talk

> Are there any other ways to "merge" two PDFs w/forms without having to use cfpdf action="merge" ?

Not that I'm aware of.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355603
Reply all
Reply to author
Forward
0 new messages