Expand my Community achievements bar.

SOLVED

Item's position on page

Avatar

Former Community Member

Hi - I'm still quite new to LiveCycle so hopefully this'll be easy.

I'm producing a PDF and I'm trying to pull out information about each item to put in the bookmarks XML so that I can bookmark the PDF dynamically.

I've found that I can use xfa.layout.page(this) in the layout:ready script to get the page number of each item, but I can't work out how to get the position of each item within the page.  All I can find are this.x/this.y and xfa.layout.x(this) / xfa.layout.x(this) but those give 0,0 - which I beleive is because the item is at the top left of the item that contains it.

Does anyone know how to get the position of an item on the page?

Thanks

Dan

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Dan,

John Brinkman has x, y samples on his blog: http://blogs.adobe.com/formfeed/category/transpromo

I have a sample here that accesses the x, y position of objects and the mouse, which may help.

http://cookbooks.adobe.com/post_Moving_Objects_Around_a_Form-16519.html

and

http://assurehsc.ie/blog/index.php/2010/05/moving-objects-around-a-form/

You are correct that the coordinates are based on the top/left of the container. When working with coordinates I tend to set the Master Page container to 0,0, so that all objects are then based off this.

Good luck,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Dan,

John Brinkman has x, y samples on his blog: http://blogs.adobe.com/formfeed/category/transpromo

I have a sample here that accesses the x, y position of objects and the mouse, which may help.

http://cookbooks.adobe.com/post_Moving_Objects_Around_a_Form-16519.html

and

http://assurehsc.ie/blog/index.php/2010/05/moving-objects-around-a-form/

You are correct that the coordinates are based on the top/left of the container. When working with coordinates I tend to set the Master Page container to 0,0, so that all objects are then based off this.

Good luck,

Niall