Expand my Community achievements bar.

SOLVED

form printing,

Avatar

Level 2

so I have a weird question.... I have been working on developing a form in LiveCycle Designer. The problem is, that when it is printed, it has to be on a double-sided, 4 x 6, green index card. I have played around with trying to force print sizes, but it always seems to revert back to 8 x 11.5 when printing.

I am now wondering about also using visible only on screen text fields, and trying to exactly duplicate the card so that when it is printed, the info would show up, but not the text feilds (which would already be on the form) and just letting people insert the actual card into the printer for printing of the data. Before I do too much, does anyone have any other suggestions which might work as well?

thank you very much.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

I have not been able to get the "getPrintParam" to work. I remember trying to get this working before and not being sucessful then either. It is documented in the Acrobat API guidance document (available from the Adobe web site), but it is written for the Acrobat Javascript.  For example,

this.getPrintParams();    becomes     event.target.getPrintParams();

While I can get this to work, pushing this to print with a flag "setPageSize" has not been sucessful.

I am uploading a form, which may be of some assistance. Basically the fake print button first calls the page setup menu command. This is a prompt to the user to change the page size from A4 to A6 (this is the closest I could find to 4x6; however you may have a better paper size in your locale).

I appreciate that this is not fully automatic, but along with some suitable text (or app.alert) you can tell the user what paper they need to specify before hitting the print dialogue.

25-08-2009 18-55-42.png

The template script in the XML Source is driven by the Form Properties dialogue, so you would be better to make the changes there rather than directly in the XML Source. There isn't anything there that will help you in your particular requirement.

25-08-2009 18-50-49.png

I hope that helps you,

Niall

View solution in original post

21 Replies

Avatar

Level 10

Hi Nancy,

No problem!

Step by step:

*

When you have finished the form and are happy with the layout, make sure that all of the fields are named uniquely (in the hierarchy view) and have their binding set to "Global" in the Object / Binding tab.

*

Then go to the hierarchy view and select the first page. Go to the Edit menu and select Duplicate. This will create an exact copy of that page.

*

Rename this new page, so that the script can identify which page to show and which page to hide.

*

On the new page, delete all of the static text that appears on the pre-printed green card. Also delete all of the buttons (as the user will not need these on this page).

*

Then go to each field in turn and delete the caption (either in the Object / Field tab or by double clicking on the object). Set the border to solid and white (again in the Object / Field tab, custom appearance)

*

Once you have this done you should have a copy of page 1 with only the fields present.

*

Then you select this new page in the hierarchy view and in the Object / Field tab select presence to "hidden". This will hide the page in LC and in Acrobat. It will look like you only have one page, but the copy of page 1 is still there, you just can't see it.

*

If you have a look at the script in the "Print on template" button, you will see instructions in the mouseUp event and postPrint event that show and hide alternate versions of page 1. Just copy over these buttons and amend the script to reflect the names of both your visible pages 1 and 2 AND your hidden pages 1 and 2.

If you open the PDF in the previous post, in LC Designer. Select page 1b and set the presence to visible. Have a look at the structure and layout. Look at the names of the objects on page 1a and 1b - they are the same name and have a global binding. This means that the info that the user types in on page 1 will automatically appear on the hidden page 1b and will print if the user selects that print button.

I hope that helps,

Niall