Does anyone know if there is a way to create a "drawing field"? That is, a field that in the static form would allow the user to click and drag with their mouse to create simple drawings?
Solved! Go to Solution.
Hi,
You can set up a button to use Acrobat's Ink Tool; however the form MUST be saved as Static for this to work.
Here is a sample: https://acrobat.com/#d=7x14flq1feFHAvrMGuNOBg
I have two buttons (1) for the Ink Tool and (2) to revert to the Hand Tool. However once the Ink Tool is selected, buttons can't be pressed, so I added another button around the drawing area with script in the mouseExit event to change back to the Hand Tool. This works provided the user is not currently drawing.
Apart from trying to script a mouse tracking / drawing tool this is the easiest solution. It may be that Flex/Flash Builder 4 would be a better option.
Good luck,
Niall
OK, what I have discovered is that if the form is enabled for comments, the buttons do not appear to work. Therefore if it was going out to users with Reader you would replace the buttons with instructions for the user to select the Pencil Tool from the Tools > Comment & Markup menu.
Here is a version that is not enabled for comments, where the buttons work: https://acrobat.com/#d=4gRWyuvrPz*vRATzlsrxow
This started from here: graphical data input for online forms
Views
Replies
Total Likes
Hi,
You can set up a button to use Acrobat's Ink Tool; however the form MUST be saved as Static for this to work.
Here is a sample: https://acrobat.com/#d=7x14flq1feFHAvrMGuNOBg
I have two buttons (1) for the Ink Tool and (2) to revert to the Hand Tool. However once the Ink Tool is selected, buttons can't be pressed, so I added another button around the drawing area with script in the mouseExit event to change back to the Hand Tool. This works provided the user is not currently drawing.
Apart from trying to script a mouse tracking / drawing tool this is the easiest solution. It may be that Flex/Flash Builder 4 would be a better option.
Good luck,
Niall
OK, what I have discovered is that if the form is enabled for comments, the buttons do not appear to work. Therefore if it was going out to users with Reader you would replace the buttons with instructions for the user to select the Pencil Tool from the Tools > Comment & Markup menu.
Here is a version that is not enabled for comments, where the buttons work: https://acrobat.com/#d=4gRWyuvrPz*vRATzlsrxow
This started from here: graphical data input for online forms
Views
Replies
Total Likes
Thanks a lot Niall! This is exactly what
i was looking for!
Views
Replies
Total Likes
So I ran into a problem. When I load a form data file into my form the signature does not appear. It would seem the drawing info is not being carried into the data file. Any suggestions?
Thanks,
Ian
Views
Replies
Total Likes
Hi Ian,
I am out of the office today, so can't test. However the drawing is a
"comment and markup". I am fairly sure that it won't get exported with
the XML. When the form is open Acrobat you will see the comments
navigation tab towards the bottom left of the window. If you open the
comments navigation tab, you should see the drawing as a series of
comments.
Now if you open the signed version of the form look in the navigation
tab to see if the comments are there.
Also check if the signature field allows comments (not sure if that is
an option).
Hope that helps,
Niall
Views
Replies
Total Likes
Hi Ian,
I now see that you are referring to a hand-drawn signature rather than a digital signature.
I have reworked the example to include fields: https://acrobat.com/#d=3-9PHIOZg4iBeLtwsJbLHw
I guess you are familiar with importing and exporting data from within Acrobat:
If you are dealing with comments drawn using the Ink Tool, then you can import and export these separately using the Comments menu:
Acrobat exports the comments as an "fdf" file, whcih can then be imported into another form.
So if you form has data and comments the export and import will be a two-step process.
While you can script a button to export/import the XML data, I don't think you can do the same for comments. I tried:
app.execMenuItem("Annots:ExportToGeneralFileMenu");
but it did not work.
Hope that helps,
Niall
Thanks Niall that certainly makes things easier. Just a couple of questions.
1) I have set up an http submit button for this form. Is there a way I can get it to send both the XML data file and the FDF data file?
2) I have added a clear form button the form, but this does not remove comments. I am having trouble finding the correct java directory to create a delete comments button. Do you know if this is possible?
Thanks again for all your help!
Views
Replies
Total Likes
Hi,
You can specify the data to be returned in XDP format, which will include the data and comments/markups. The XDP is a XML file that contains a dataset for the user inputs and the drawing as a series of gestures.
Hopefully this will work for you, because submitting as XDP would seem to cover both raw data and the drawing/signature in ONE operation.
Updated sample here: https://acrobat.com/#d=t-MxMf6*GAArCEJCMa9bJw
I don't think that you will be able to script to remove the comments/markups. There doesn't seem to be a menu item for deleting the comments, so I suspect that it will not be possible to emulate this. The only option that I can see is to open the comments nagivation tab and to manually delete the comments:
I hope that helps,
Niall
I tested the XDP format, but to no avial. It is importing all of the form datat, but still not the comments.
I also gave the XFD format a try, but obtained the same results.
Have you tested this?
Is there somthing I am doing wrong?
Thanks,
Ian
Views
Replies
Total Likes
Hi Ian,
Try importing this XDP file into a blank form: https://acrobat.com/#d=vatyovvisfDv2U5QEcIC9Q
From the Forms menu Select Import Data. The exact sub-menu will depend on the version of Acrobat you are using:
Browse to the _data.xdp file (you will need to change the file type to XML Data Packages, which is the XDP type):
That works here (import XDP and export XDP).
Niall
Views
Replies
Total Likes
It would seem I am having very particular problem. I have been exporting and importing XDP files using your example, the form fields will fill out fine and your name shows up every time. The problem is any comments that I add will not be included in the XDP package. I looked at the coment propories of your name and my additions. They are identical. I tried saving the form and then exporting the data, but i get the same result. Any idea why this is happening?
Thanks,
Ian
Views
Replies
Total Likes
I am using Acrobat 9 pro by the way...
Views
Replies
Total Likes
Hi Ian,
I am using Acrobat 9 Pro as well.
First of all here are some files:
Now what I have discovered is that not all XDP files are the same!!!
If you open the last four files in an XML editor or TextPad, then you will see the following:
Now I just think this is a bit buggy. If an XDP file is created that includes the gestures (via the submit button), then why are they not being imported? In addition why are the two methods of generating an XDP Data Package giving different results (1) menu export without the annotations and (2) submit XDP with the annotations?
The behaviour is not what a user would expect.
OK, all is not lost.
If simply drag ANY of the three XDP files onto Acrobat then the rawData AND annotations are there (????). Good news, but why?
Phew...
So lessons learnt - if you want to export annotations and rawData use a submit button set to submit XDP data packages. These will work. Exporting from the menu to XDP data packages will not work.
Hope that helps. I will be away from the desk today, but will get emails. Good luck,
Niall
Views
Replies
Total Likes
WOW! You rock Niall
The email submit - drag n' drop method works great
Its been more than a week of you helping me with this. I can't thank you enough!
... but for what it's worth, thanks a lot!
PS. I liked your drawings
your my hero,
Ian
Views
Replies
Total Likes
No problem, glad you have it working!!!
Just a few things. I have been digging around the XFA specification and XDP is covered in Chapter 23 of the following: Adobe XML forms 2.8 specification
Apparently you can control exactly what goes into the XDP, using xdpContent. I haven't done this, but it is in the specification and the help file.
Also the XDP submit does not automatically embed the PDF, but again this behaviour can be scripted for:
Button1.resolveNode("#event.#submit").embedPDF = "0";
So the XDP files from the submit button in the previous posts do not have the PDF embedded, just a fuller href to the original PDF.
Anyway good luck with that,
Niall
Views
Replies
Total Likes
I am quite new at this program, and would like to ask you a question about the diagram area you speak about.
I really like the feature you created, it is exactly what I am trying to do with one of my forms. I would like to create it in two areas, one for a diagram and one for a signature capture. I recreated what you have described and have the form set to static, it functions almost as yours does but the final step of marking the page is not occuring.
I was wondering if you could help me work through this? the form this feature will be on is for internal use only on laptops we control. I also have to make sure that when the form is saved upon retreival the images can be seen (both on the screen and in a printed version of the report).
Views
Replies
Total Likes
Hi Niall
You had some samples with this post, Would it be possible to obtain them, the links in the post do not seem to be working
Thanks
Mike
Views
Replies
Total Likes
Hi MIke,
my name is Torbjörn (Tobbe) from Sweden here, this message was intended for NIall in this forum, but maybe this forum is to old and outdated, i don´t know, but anyway, i see that you also have/had some questions to be answered about Livecycle Designer, please, if you have time and possibilitys, read my question here, and maybe we can help each other out in the future, ok, here´s my original question today, april 23 -2018.
Question:
Right now i am working with Livecycle ES4, and a special form made for dentists. for example, when they ordering dental work from a supplier, in my form there is a field with an illustration of teeth, I want the dentist to draw / sketch upon that picture, (not change the picture itself of course) just add some lines and do some markings, it this possible or do i fight here with windmills? (My document is a static pdf and the submit button will send the filled pdf itself, not necessary to send the XML-data.)
Maybe you have som answer to this, or knowledge about it?
Best regards
Torbjörn
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies