These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Printing field Names

Robinsmith
Registered: Apr 10 2007
Posts: 4

I am using Adobe Livecycle designer to create some forms which are automatically populated from XML data via a website. I need to know whether there is a way to print the form with the field binding names showing on the form as this would help enormously with the form design / tweaking operation.
 
Thanks

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Wow, this is a really interesting idea. But no, there isn't any built-in way to do this, at least that I can find. However, it's not too much of a stretch to write a script that would create a mock up of the form with the field names and locations in the correct places. The steps are:

1. create a new pdf with the correct number of pages and page sizes in the LiveCycle form
2. Walk the fields on the live cycle form. Use the xfa.layout.pageContent() function to grab all the fields on each page.
3. Add AcroForm text fields to the new PDF in the locations and sizes specified by the fields on the original XFA Form.
4. Populate the added fields with the names of the fields on the original XFA Form.

This is very much an Automation/Design script so it has to be privileged. Run from either the JavaScript Console or a Custom Toolbar Button, see [url=http://www.windjack.com/products/acrobuttons.php]AcroButtons[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

lsutton
Expert
Registered: Nov 15 2005
Posts: 51
A simple way to do this is to add a text field to your form and display the field names and their values in that field.

You can add JavaScript to this new text field to display the field names and their values.

A "trick" to do this without doing the code yourself is to do the following:

- Add a "Paper Forms Barcode" object to your form.
- Click on the "Object" tab and then the "Value" sub-tab.
- Select "Entire Form Data" from the "Apply to" drop-down.
- Be sure that the "Include Field Names" check box is on and the "Include Label" is off.
- Press Ctrl-Shift-F5 to bring up the "Script" window.
- Select and COPY all of the code in the "Calculate" event inside the barcode.
- Click on the new text object you created.
- Inside the code Window select "Javascript" on the language drop-down
- Select the "Calculate" event on the events drop-down
- Paste the code you copied from the barcode.
- In the "Object" tab, "Field" sub-tab, be sure that "Allow Multiple Lines" is selected.
- Resize your text box so that all fields and content will be printed.
- Delete the barcode object from the form.

As you populate the form you should see the field names and data populating the text field.

By default the field names and data are tab-delimited. The script is fairly clear if you want to modify this format.
Robinsmith
Registered: Apr 10 2007
Posts: 4
Thanks guys for the quick responses.

Unfortunately I'm quite a newbie at this sort of thing and both your suggestions are beyond my skillset.

Lee's answer would seem to work, but I cannot paste the javascript into the text area, as the system won't allow it.
bettymac
Registered: Mar 13 2009
Posts: 19
I also create forms and like to print the form with the field names. I was able to do that using Snag-It (the complete field name isn't always visible, but it shows me what I need). With snag-it, you can set the Input to Advanced/Custom Scroll, and with the field names visible on the form, select it and click on the scroll bar and it will scroll to the bottom of the page, even if it's not visible in your window. You can also change the output properties in snag-it to set how you want it to fill/fit the printed page.