cancel
Showing results for 
Search instead for 
Did you mean: 

Page Break Logic in Adobe

Former Member
0 Kudos

Hi All,

I have a requirement like I have 2 items corresponding to the 1 delivery. I need to print 1 item each

in 2 different pages. Please tell me how to include this logic in adobe layout.

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Karthikey ,

If you want one item on each page then just say NEW-PAGE after the item's text elemnent .

Something like this :

/E ITEM

NEW-PAGE

This will give you one item per page .

Hope it helps!

Much Regards ,

Amuktha .

Former Member
0 Kudos

Hi,

Is your query resolved?

Former Member
0 Kudos

It should not be much of a problem. Here is a detailed solution to your problem:

In your context , create a node MasterNode of cardinality 1...1 and singleton set to true. Bind this to the dataSource property of the InteractiveFormElement.

Inside this MasterNode create a node Data of cardinality 0...n and singleton set to false. Keep all of your payslip attributes inside this node.

In your interactive form element , in the Body Page create a subform of Type Flow Content and Flow Direction Table .Check the chechbox for Allow Page Breaks within Context . Inside this subform create another subform of Type Flow Content and Flow Direction Western Text . Uncheck the checkbox for Allow Page Breaks within Context . Put all of your output UI elements inside this subform and bind them with the attributes under the node Data. Also tick the property of the inner subform under the section Object->Subform that says Repeat Subform for each Data Item

In your view controller coding area , create an element of the node Data for each employee record and populate it with values for the particular employee .

Add all of the elements that you created into an ArrayList and bind this ArrayList to the node Data. Now your form is ready for n number of employees.

Put this sort of coding in your view controller coding:


IDataElement objData = null;
ArrayList arlData = null;
int intNumberOfEmployees=0;

try
{
        arlData = new ArrayList();
        intNumberOfEmployees = //Get size of your model node that returns employee info
        if(intNumberOfEmployees>0)
        {
                for(int i=0;i<intNumberOfEmployees;i++)
                {
                        objData  = wdContext.createDataElement();
                        objData.setName("//Value fetched from backend here");//Eg:wdContext.nodeEmployeeInfo.getEmployeeInfoElementAt(i).getname()
                        //Similarly set all of the values
                        arlData.add(objData);
                }
        }
        wdContext.nodeData.bind(arlData);
}

Hope this helps you...