Position of the element on the page
Hi - I'm still pretty new to LiveCycle so hopefully it'll be easy.
I produce a PDF and I am trying to get information on each element to put in bookmarks XML so that I can bookmark the PDF dynamically.
I found that I can use xfa.layout.page (this) in the script of layout: ready to get the page number of each article, but I can't work, how to get the position of each element on the page. All I can find are this.x/this.y and xfa.layout.x (this) / xfa.layout.x (this), but those will be 0,0 - which I think is because the element is located at the top left of the element that contains.
Does anyone know how to get the position of an element on the page?
Thank you
Dan
Hi Dan,.
John Brinkman has x, y of the samples on his blog: http://blogs.adobe.com/formfeed/category/transpromo
I have here a sample that accesses the x, y position of the objects and mouse, which can 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 right that the coordinates are based on the top/left of the container. When you work with coordinates I tend to set the container of the Page master at 0,0, so that all objects are then based on this.
Good luck
Niall
Tags: Adobe LiveCycle
Similar Questions
-
Sorting of images based on their position on the page
How would I go about sorting the images based on their position on the page? I've read a few articles which mention the use of table method fate and checking their x and y values to sort the table. While that works on the page elements that are perfectly aligned with their x and is the axis, it fails on a layout like this. Does anyone have any ideas on how I could create an individual table for line1, line2, Row3 etc based on his position there and then sort them based on their position X and then create the master table combining them in order?
I'm new to javascript, so it's a bit out of my League. Any help will be much appreciated.
Hi again,
I found an idea that seems promising to deal with the issues mentioned above. The main problem, as you have no doubt noticed, is that we cannot simply count about to coordinates (x, y) 'as they are', even after having rounded values, to extract implied rows and columns.
When we look at the layout below:
our eyes instantly detect what he expected to be 3 columns and 5 rows, but this underlying order is not immediately accessible from all sort all of the coordinates. We need to improve the algorithm.
What I propose is to speculate about the gaps that occur on the ordered sequence of coordinates x and y, respectively. To reveal these gaps, we will first sort the data along the x-axis:
The figure above shows that the width of the rectangles. Each arrow represents a rectangle, and I ordered the elements by increasing x-centers. We can estimate that the element identified #1 belongs to a new group of this simple fact: its left coordinate (red mark) is higher than the coordinated right (blue guide) of the #0element. This observation will give us a strategy to identify gaps in the column.
Then, the same method is applied to detect the lines. (Sort by values y, identify gaps, based on the progress of the min - max).
At the end of this process, each object has a (column, row) coordinate pair instead of fragmented values (x, y) . So, we can calculate the final order, i.e. the weight of the comparison function.
Here is my implementation of this algorithm:
// ======================================================== // Up2Bottom and Left2Right Sorting Algorithm // addressing (weakly) sparse rectangles // --- // Usage: Select the objects, then run the script // Target: InDesign CS4/CS5/CS6/CC // ======================================================== const CS = +CoordinateSpaces.SPREAD_COORDINATES, AP_MIN = +AnchorPoint.TOP_LEFT_ANCHOR, AP_CENTER = +AnchorPoint.CENTER_ANCHOR, AP_MAX = +AnchorPoint.BOTTOM_RIGHT_ANCHOR; var sel = app.properties.selection || null, data = [], r, i, j, k, t, n, w, vMax; if( sel && 1 < (n=sel.length) ) { // Collect coordinates and IDs // --> {min:[xLeft, yTop], weight:[x,y], max:[xRight,yBottom], id}[] for(i=0 ; i < n && (t=sel[i]) ; ++i ) { data[i] = { min: t.resolve(AP_MIN,CS)[0], weight: t.resolve(AP_CENTER,CS)[0], max: t.resolve(AP_MAX,CS)[0], id: t.id }; } // Find rows and columns [i.e. y-weights and x-weights] // --- for( j=0 ; j < 2 ; ++j ) { // Sort by center coordinate // --- data.sort(function(a,b){return a.weight[j] - b.weight[j]}); // min > max ==> w++ // --- for(vMax=(t=data[0]).max[j], t.weight[j]=(w=0), i=1 ; (i < n)&&(t=data[i]) ; ++i ) { if( t.min[j] > vMax ){ ++w; vMax=t.max[j]; } t.weight[j] = w; } } // Compute final weights, clean up data, create ID-to-weight access // --- for( i=0 ; (i < n)&&(t=data[i]) ; ++i ) { w = n*t.weight[1] + t.weight[0]; // final weight (y first) k = '_'+t.id; // ID key (t.min.length=0)||(t.weight.length=0)||(t.max.length=0); delete t.min; delete t.weight; delete t.max; delete t.id; delete data[i]; data[k] = w; // ID-to-weight } // Apply sort --> r // --- r = sel.sort(function(a,b){return data['_'+a.id]-data['_'+b.id];}); // Show the resulting order // --- for( i=0 ; i < n ; ++i ) { app.select(r[i]); $.sleep(1000); } }
@+
Marc
-
return the objects while maintaining the position on the page
Is there a a way to return multiple objects at the same time while maintaining their position on the page without having to select each individually? For example, if I had a box of text at the top and bottom of a page, choose both and then reversed them, rather than the top text box swapping with that down they times remain in the same place but flip backwards?
In Illustrator, you'd have the transformation of each command to do this, but in InDesign, you must use the function transform once again, which, if you're just flipping 2 objects records all the steps. But, let's say you want to return 16 objects as you describe... in place.
Select one and choose object > transform > Flip (Horizontal or Vertical)...
Now select the other 15 and choose object > transform again > transform again individually
-
When resizing a default document, InDesign uses a central point of reference. In CS5 and then I know that I can use page.transform to move the position of the page where I want (art does not, move the page under art). Is - there anyway do the equivalent in CS3 or CS4?
To say it in other words, after you resize the width of the document, the art is not in the right place on the smallest width of page. Y at - it an easy way to position/move the page under art, or should I spend all the art page? If I have to move all the art, is there an easy way to do this considering that there may be several layers, objects/layers locked?
I hope that makes sense. Thanks in advance,
Dan
N °
You will need to loop through all the pageItems and move them individually (check if they are locked as you go...)
Substances
-
Positioning of the page printing Options
Hello
InDesign has the print options for the placement of the Page under "print > Setup > Options > > Page Position.
This allows to center the objects printed on the page. For example, to print an A4 paper on A3 paper and have a large area around the content for users to write on.
Is there something similar in InCopy for printing the "layout view"? I looked but have been unable to find something useful.
Hi David,
Although the goal of InDesign is completely different from InCopy. You can still print out InCopy stories, please see the link below, but it has all of the options you mentioned as an identifier.
Kind regards
OM
-
If necessary, scroll to the same position after the page navigation
Hello
I have a use case where I have an af:table and a full line. Now, when rolls the user down to a particular rank and click on to access the different page (DrillDown). Now when the user returns to the page, the scroll of the table position must be kept. As if I clicked on the 5th row in a range displays, it should be displayed as the 5th in the user interface.
I use Jdev 11.1.1.7
Please let me know if you need more details.
Kind regards
Chick.
You can't possibly maintain accurate scrolling position (if I understand your question)
As an alternative, you can modify your table to use paging: https://blogs.oracle.com/jdevotnharvest/entry/table_pagination_with_jdeveloper_11
Dario
-
How can I use applescript to move objects to a specific position on the page?
I have a PDF file with a bunch of items of text on each page, but the margins are irregular. I want to automate the following process:
1. Select all the objects on the page
2. move objects (such as a group, i.e. preserving their arrangement relative to each other) until the upper left corner of the object of most of the top-left {. 67 ", 1"} from the upper left corner of the page.
3. go to the next page.
4. Repeat steps.
I work on a mac, and I see that Acrobat is scriptable using Applescript. Is it possible to do it with this? If there is another way to describe this process without Applescript, I'd be open to that as well.
Thank you very much.
Acrobat has no interface for scripts change the position of an ordinary object.
-
Long Documents-page numbering that moves if the position of the page changes
Is there a way to mark a selection of text, i.e.
(See map on page 126).
If the page it is on, say he moves to page 127, page number changes?
In addition, what he called, in order to search his house in the documentation, but for later use?
Cross references
-
When to return to the previous page, the web browser of the Torch 9800 always goes to the top of the previous page instead of the previous position, so he must always scroll down to the old post to continue playback from the previous post. Any solution to this?
Problem solved with the latest version of the device software 6.0.0.246
-
Change the position of the pages
I'm working on PC, with Indesign CS 3. I wrote a 600-page book, 400 photos and extensive notes. Now, I try to change the position of 10 pages. The order 'verschieben Seiten' is OK, no problem with - for example - the pagenumbers. BUT: My notes numbers will not be told. Example: I take Page X with note 30-34, page 250 page 420. The last note on this page is 320. Now, my notes on page X must be reported: NO 30-34, BUT 321-325. It does not work. My X page changes the place, but my notes do not recognized this. They believe that they are already to the 250 page... Is there a possibility to reorganize my notes? InDesign
This has nothing to do with age! This is the expected behavior.
Break the link between text blocks is unnecessarily complicated, for
the reason why you've noticed. And Adobe has not provided a simple way to
that, although there is at least a free script available
somewhere out there.
But a script is not required.
Break the link as you did. The text disappears.
Now, place your cursor in text after the last visible character in the
previous text block. Press CtrlSHIFTend to select all the invisible
text. Press Ctrl-X to cut it. Place your cursor in the empty text frame,
and paste the text you have just cut.
That's it: the link is now broken, and everything should be in place.
Repeat for the last image (as in my previous post) and continue
According to the above instructions.
-
positioning of the page layout
Here is my problem child. http://www.indianaeagleforum.org/contact_join.html
How can I get my also, centered layout like in http://www.indianaeagleforum.org/index.html how to make the image and the text stay in the width to 780 pixels as in the index page. Thank you very much.
Diana HunterI think I got it after several tries. See http://www.indianaeagleforum.org/contact_join.html
-
Insert the Page without re - apply the Master Page
Hi, using InDesign CS5, I try to insert a page after page 1 of a catalog without re - apply the master page to all pages that follow - is - possible? I have set up in the master that I would delete not instead of text boxes.
Any advice would be much appreciated.
See you soon,.
DC
Sorry, I know that this was not clear.
When a page switch sides in the spread of the elements of the template that have been overridden, as blocks of text in which the text has been flowed, will be maintained, but the new position of the page also has main objects and these masters objects will all be there. In the case of things like the headers or footers or other objects that have not been overridden, new objects will appear and the 'old' will disappear, but for what it is overridden, you'll have the old and the new. Without using something like the plugin Pro Auto-Flow - Tools.com, the only way to avoid this is to add or remove multiples of two, or rethink the use of the main object. These blocks of text should be on the master page? You can "auto format" text without master images, and most of the time setting the margin and column guides to contain the flow is preferable to the use of a block of text type for precisely the reason that you see.
-
Print the URL at the top / bottom of page is too small and half out of the page
I put it to print the URL and the title at the top of the page and the Date at the bottom of the page. He tries to do, but the impression is verrry small and 1/2 off the page.
Works very well with Google Chrome.
New printer WF 2540, test page is good.
Mac 10 XThanks for your help!
Peter
The font size of header and footer is still low. Last time I looked, I couldn't find a way to replace the default size of 10 others to choose a font that is intrinsically superior to Times New Roman as your default serif font. See: can I possibly enlarge the headers and footers in the "Page layout" menu of Firefox to make bigger it so I can see it better... or is this something I won't have to deal with being so SMALL. I don't check for a complementary solution; You can try looking for one on the Addons site.
As the position on the page, some printers don't allow you to get all the way at the edge of the sheet. If that's the problem, you might be able to fix in the General settings of your system for your printer dialog box. I don't see a way to access of the Mac print dialog (Firefox print dialog screenshots in this article: How to print webpages in Firefox), so that you may find in Control Panel.
If this does not work, there are certain preferences that Firefox stores with names similar to the following. In these environments, 25 = 1/4 inch (the value is divided by 100).
- Print.printer_BrandX.print_unwriteable_margin_top
- Print.printer_BrandX.print_edge_top
To modify these, you can use the subject: configuration preferences editor. In a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful. Then use some of the more unique terms (for example, unwrit or edge) to filter the list.
-
Firefox comes back to the top of the page when returning from a url why
Hello
When you use a search engine like google and by selecting a web site, when I use the left arrow to return to the results of my search for the web page is at the top of the list of the sites found not where I was down for.
A slight but pain can it be set to return to the initial position of the page?
Thank you
Arnak
Why not open each search result in a new tab and close each tab when you are done with it, instead of going forward and back in the same tab? The original search page will not need to reload each time you return.
-
HELO all,.
I have a basic question of CSS, but went empty as a spry menu box in a header div positioning
The page is http://empdigital.NET/mockups/nav_in_header.html and I just want to check the vertical position of the bar menu at the pixel level.
Any help appreciated.
Thnx
DJDEL0530 wrote:
HELO all,.
I have a basic question of CSS, but went empty as a spry menu box in a header div positioning
The page is http://empdigital.net/mockups/nav_in_header.html and I just want to check the vertical position of the bar menu at the pixel level.
Any help appreciated.
Thnx
First add float: left; in your style (as shown below) img tag
Then add
before the tag closing 'head' (as shown below)
Then you can position the vertical navigation by adding a margin greater than the
- tag (as shown below)
UL. MenuBarHorizontal
{
margin: 20px 0 0 0;
padding: 0;
list-style-type: none;
do-size: 100%;
cursor: default;
Width: auto;
float: right;
} -
Centering of the pages of the web site in Dreamweaver
I was wondering if anyone know's how to center the pages of the web site using CSS if it is possible, if not what else?
(I use 8 or MX)It depends on if you use absolute positioning on the page, regarding
method which might be the best, but in both cases, this won't work--Change
on this subject.
-change
on this subject.
and this-
on this subject.
and see if that helps.
--
Murray - ICQ 71997575
Adobe Community Expert
(If you * MUST * write me, don't don't LAUGH when you do!)
==================
http://www.dreamweavermx-templates.com - template Triage!
http://www.projectseven.com/go - DW FAQs, tutorials & resources
http://www.dwfaq.com - DW FAQs, tutorials & resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
=================="evanescence86" wrote in message
News:evdmo5$7HF$1@forums. Macromedia.com...
> I was wondering if anyone know's how to Center your website help pages
> CSS if it is possible, if not what reverse?
Maybe you are looking for
-
iTunes won't let me not sync my phone more?
So I've recently updated my 5 c to 10 iOS iPhone and usually, if I connect my phone to my laptop (it's all a Dell Inspiron 15 with 10 windows), iTunes will automatically open and start to synchronize. Before, I had an older version of iTunes and it s
-
Facebook application for Toshiba Journ.E touch
Hi guys (1) my Toshiba - DAY tablet. E TOUCH doesn't have the application for facebook of begging, when I bought it.I try to find the virtual store and I have noy could find it.Can you please help me where I can find this application? (2) what video
-
Defective nVidia GPU in my laptop X 200-21 L Satego
Helloas the owner of a Satego X 200-21 L I have not only one but two nVIdia GPUS, SLI, 8600GT. NVIDIA said these chips as faulty and United States, they started an action, or support the repair or a replacement.My laptop is a brick now, because of tw
-
Someone knows a way to restore the serial number in the BIOS/UEFI? After the BIOS/UEFI to level v02.05 LAN to LAN 02.11, product name, SKU number, serial number and stock number are empty. This results in issues with error thrown POST and HP SoftPaq
-
Table axis range error labview
Hello I'm trying to programmatically set the chart to display a minute 30 or 60 minute range. I can do this by setting the following in a case manager properties, if the user presses a button to apply the settings of the map (with the display of abso