天天看点

Adobe form batch output print mode - multiple

requirement

Customer wants to render the body page 4 times on 4 different master page in one PDF. Take “Invoice” as example, the first copy will be printed on master page with text “for Customer”, the second copy will be printed on master page with text “for archive”.

Currently our method is to have 4 same body pages, but in the other 3 body pages, we have to use scripting to get the table content and display. Because the data has been consumed by table in the first body page, it will not show in left body pages.

One form with several pages will be printed with 4 copies, but not same copies.

All other parts including page number should be same, but the form title of each copy is different. For example “Invoice-For customer”, “Invoice-For Archive”. “Invoice-Duplicate” and “Invoice-for auditing”

Issue

We have two questions regarding the template:

We want the same template to printed three copies. The difference is the title for those three copies should be different. As you may see in mock up, Copy 1 title “Delivery Note”, Copy 2 title “Delivery Note For Customer”, Copy 3 title “Delivery note for Archive”. the page numbers should be also “1,2; 1,2; 1,2” instead of the normal sequence “1,2,3,4,5,6”.

Another issue is we want to print a note field only in the last page of the form, the position should be always just upon the footer. Please see in mock up. I tried to put it in bodypage, but the position cannot fix to upon the footer. If I put it in master page, I can locate the position, but in the first page, I have to hide this note filed. The position cannot be released since it’s not flow in master page. Do you have any better solution on this?

Solution

See attached PDF which contains attachments referred to below:

The best approach for printing multiple copies is to use the batch mode in the server. This allows a single template to use an XML data file which has been wrapped in a top level node (see attached batch...xml file). There is a directive when calling ADS on the server that uses this and generates n instances of the template, based on the number of nodes in the data file.

To show the different title, I changed the title to use a text field and bind the title to the data.

To show a note on the last page, I added the note field to the last master page and then used a script to hide the field except on the last page:

if (xfa.layout.page(this) < xfa.layout.pageCount()) {

this.presence = "invisible";

}

If these solutions are not acceptable, I would suggest the following alternative:

In the P3B Designer (version 8.0 or later) which is available for use by SAP in the ADS project: there is the ability to design master pages which can be more specific than just ordered occurrence. In this case, you could design a single template and repeat the sequence of master pages for more than one set of data.

If you chose to not use data for the title, then you can selectively set the title in the template via scripting.

If you chose the P3B Designer, you can create a "last page" master page to contain the Notes field.