on 08-18-2011 5:20 AM
Hi Gurus,
My requirement is to print page numbers ONLY if the page count is more than 1 ,i.e. if the data getting displayed in 1 page only then don't print "Page n of m" but if it is getting displayed in more than 1 page then display "Page n of m" on TOP right corner.
I selected "Page n of m" and it creates 3 fields in object hierarchy i.e TextField CurrentPage, TextField PageCount and Static Text field Pages.
I go to the ready:layout of PageCount object, and use below script:
this.rawValue = xfa.layout.pageCount();
if (this.rawValue == 1) {
this.parent.Pages.presence = "invisible";
}
I looked at the message but it doesnot resolve my problem.
Please help me out.
Regards
Ajay
Hello Ajay,
Script do not work for TextFields. to get the page numbers displayed. Select Text field from library and Go to Object Pallete, Value tab and select "Calculated - Read Only" in Type and choose Runtime property. There you can find the Number of Pages.
Once this is the text field, you can write script on it.
If(this.rawValue == 1)
{
this.presence = "invisible"
}
similarly write script for total number of pages, but make sure that variable is accessed properly.
Please let me know, if you still see some issues with it.
Thanks,
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.