How to get Absolute Coordinates of a Field.

I know that the properties "x" and "y" of any field of PDF Form will give me the coordinates relative to the parent object.
How to get the absolute coordinates of any object (or any field) on a PDF Form?
My objective is to make a Subform Visible or Hidden and reposition it close to any other field in order to display some extra text to show more info about the required field.
How I can do that?
Tarek.

Hi,
I wrote a recursive function that will go up in the forms hierarchy and summarizes the x and y coordinates of the parent objects.
var vX = 0
var vY = 0;
function findCoordinates(vNode) {
    if (vNode !== null) {
        if (vNode.className === "field" || vNode.className === "subform") {
            console.println(vNode.name + " > " + vNode.x);
            var xUnit = vNode.x.match(/(mm|cm|pt|in)/g);
            var xValue = parseFloat(vNode.x.replace(xUnit, ""));
            if (xUnit === "mm") {
                vX += xValue / parseFloat("25.4");
            } else if (xUnit === "cm") {
                vX += xValue / parseFloat("2.54");
            } else if (xUnit === "pt") {
                vX += xValue / 72;
            } else {
                vX += xValue;
            var yUnit = vNode.y.match(/(mm|cm|pt|in)/g);
            var yValue = parseFloat(vNode.y.replace(yUnit, ""));
            if (yUnit === "mm") {
                vY += yValue / parseFloat("25.4");
            } else if (yUnit === "cm") {
                vY += yValue / parseFloat("2.54");
            } else if (yUnit === "pt") {
                vY += yValue / 72;
            } else {
                vY += yValue;
        findCoordinates(vNode.parent);
    var vCoordinates = (Math.round(vX * 2) / 2) + "mm " + (Math.round(vY * 2) / 2) + "mm";
    return vCoordinates;
Textfeld2.rawValue = findCoordinates(xfa.resolveNode("Teilformular1.Teilformular2.Textfeld1"));

Similar Messages

  • How to get automatically sysdate in a field

    How to get sysdate automatically in a field in ADF

    As provided in the above blog post provided by Branislav,
    use the groovy expressions for defaulting the date using the following expressions is the right & recommended approach:
    Only date: adf.currentDate
    Date with Time: adf.currentDateTime
    see section 3.6.1 in ADF Developer's guide:
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcintro.htm#CEGJJJBA
    Thanks,
    Navaneeth

  • How to get google back in search field

    how to get google back in search field of Safari

    Safari 6
    URL address bar and Google search are unified and is called Smart search field.
    When you search with Google "Google search" will appear.
    There is no more a separate Google search field.
    Prior versions of Safari
    Click the "View" menu in the Safari menu bar and select "Customize Toolbar".
    From the dropdown drag the default set into the Toolbar.

  • How to get the coordinate of a cell in the jtable?

    How to get the coordinate of a cell in the jtable?
    How to get the point of a cell in the jtable?
    Thanks for help!

    getCellRect(...);

  • How to get absolute path of a form within the Forms

    Aslam o Alikum (Hi)
    How to get absolute path of a form within the Forms 6i or 9i
    For example
    i am running a from "abc.fmx" from C:\myfolder directory
    can i get the form path 'C:\myfolder' by calling any any function from "abc.fmb"

    There is no direct call that will always work. What you need to do is call get_application_property(current_form). This may have the full path in it, depending on if that path was defined when the form was launched. If there is no path, then you need to use TOOL_ENV.GETVAR to read the Forms<nn>PATH and the ORACLEPATH, parse those out into individual directories and then check for the FMX in each.
    I already have some code to do all this for you see:
    http://www.groundside.com/blog/content/DuncanMills/Oracle+Forms/?permalink=4A389E73AE26506826E9BED9155D2097.txt

  • How to get absolute in servlet

    how to get absolute in servlet like c:\temp\apache group\tomcat4.1\test\abc.gif, thanks

    do sthing like:
    getServletContext().getRealPath("/abc.gif") in any servlet in 'test' to get the real path of abc.gif - The parameter should be relative to the current context

  • How to get length of a data field

    Hi Experts,
    How to get length of a data field. For example data field /BIC/0COSTCENTER length is 9. and the entry in the table is /BIC/0COSTCENTER = 1000 only. How to get the lenth of value in the table.
    Any help greatly appreciated. Thanks.
    Best Regards,
    Suresh.

    Below is example  code
    Data: var1(10) type c value '2500',
          var2 type i.
    var2 = Strlen( var1 ).
    write var2.
    <b>Reward Points for helpful answers</b>
    Satish

  • Get location/coordinates for a field using JavaScript in Acrobat Professional

    Good day,
    I am looking for a way to get the coordinates of a text field.
    I would like to create a listbox and set the location of the listbox top left to the text fields bottom left coordinates, I have had a look at the scripting guides ... could not turn up anything.
    I know how to create and populate this listbox using the JavaScript code, only problem is, to get the coordinates of the text box.

    Try this:
    1. Move or change the dimensions of the text boxes on the extracted page in the configuration that you want.
    2. When you are satisfied with the new configuration, modify the following JavaScript to use the names of the text boxes that you want to include on the page.
    //find_rect //find coordinates of text boxes whose names are included in the var rct,ary = ["fld_1","fld_2","fld_3","fld_4"]; //...etc.
    for (j = 0; j<ary.length; j++){
    console.println(ary[j]);
    rct = this.getField(ary[j]).rect;
    for (i= 0; i< rct.length; i++) console.println(rct[i]);
    3. Add the modified code to the document level of form. (as a doc level javascript but with no function name or brackets included.
    4. When you run the code, the coordinates for the fields that you have included in the array will be printed in the console window:
    Example:
    fld_1
    21
    777
    296
    717
    fld_2
    30
    769
    65
    729

  • How to get the table of value field? and can we expand the technical limits

    Dear
    I have created value field in COPA with KEA6. And now, I need the table which the value fields are saved. Yet, I have tried a lot to find it and get failure? Can any guy help me? Please tell me how to get the table of a value field.
    And another question is that, can we extend the technical limits for the number of value field for ECC6.0?
    We have a note for R.4.x Please see below:
    OSS note 160892
    You can display the length of a data record using Transaction KEA0 ('Maintain Operating Concern'). After you have navigated to the 'Characteristics Screen' or to the 'Value field Screen' choose menu path 'Extras -> Technical Limits'.
    The maximum displayed here under 'Length in bytes on the DB' is the maximum length permitted by the Dictionary. The reserve required for the release upgrade must be subtracted from this value.
    To increase the allowed number of the value fields, increase the value that is assigned to field ikcge-bas_max_cnt (FORM init_ikcge_ke USING fm_subrc, approx. line 165) in Include FKCGNF20. It specifies the number of the possible value fields. The corresponding part of the source code is attached to the note as a correction.
    David Sun
    Regards!

    how to extend the limit of value numbers? please see the original question.

  • How to get the total no.of fields count in TFS

    How to check this:
    You can define no more than 1,024 work item fields in the same team project collection, and you can set no more than 1,024 fields to
    reportable in all team project collections.
    I have created some new fields in my customized process template. How to get the field count to check this validation. Do we have any command for this since witadmin listfields does not give the total count info.
    Thanks
    Divya

    Hi Divya, 
    Thanks for your post.
    Try to get fields count in collection using below code snippet:
    TfsTeamProjectCollection tfs =
    new
    TfsTeamProjectCollection(new
    Uri("collectionURL"));
    tfs.EnsureAuthenticated();
    WorkItemStore workitemstore = tfs.GetService<WorkItemStore>();
    FieldDefinitionCollection fields = workitemstore.FieldDefinitions;
    // get fields count in this collection
    Console.WriteLine(fields.Count);
    //get each field name
    foreach(FieldDefinition
    field in fields)
    Console.WriteLine(field.Name);
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get the value of the field 'KOMP-NETWR' in Pur.

    Hello everyone,
    how do i get the value of the field 'KOMP-NETWR' in the purchase order.
    thanks
    Arnaud

    Hi,
    Try this code similarly for komp
    REFRESH i_komv.
    CLEAR i_komv.
    CALL FUNCTION 'PRICING_REFRESH_TX'.
    CALL FUNCTION 'REFRESH_TAX_TABLES'
    EXPORTING
      LIVERY        =
    LOOP AT i_ekpo INTO wa_ekpo.
      wa_taxcom-bukrs = wa_ekko-bukrs.
      wa_taxcom-budat = wa_ekko-bedat.
      wa_taxcom-bldat = wa_ekko-bedat.
      wa_taxcom-waers = wa_ekko-waers.
      wa_taxcom-hwaer = wa_ekko-waers.
      wa_taxcom-kposn = wa_ekpo-ebelp.
      wa_taxcom-mwskz = wa_ekpo-mwskz.
      wa_taxcom-wrbtr = wa_ekpo-netwr.
      wa_taxcom-xmwst = 'X'.
      wa_taxcom-lifnr = wa_ekko-lifnr.
      wa_taxcom-ekorg = wa_ekko-ekorg.
      wa_taxcom-matnr = wa_ekpo-matnr.
      wa_taxcom-werks = wa_ekpo-werks.
      wa_taxcom-matkl = wa_ekpo-matkl.
      wa_taxcom-meins = wa_ekpo-meins.
      wa_taxcom-mglme = wa_ekpo-menge.
      wa_taxcom-mtart = wa_ekpo-mtart.
      wa_taxcom-land1 = wa_ekko-lands.
      wa_taxcom-ebeln = wa_ekpo-ebeln.
      wa_taxcom-ebelp = wa_ekpo-ebelp.
      CALL FUNCTION 'CALCULATE_TAX_ITEM'
        EXPORTING
          i_taxcom                  = wa_taxcom
        IMPORTING
          e_taxcom                  = wa_taxcom
        TABLES
          t_xkomv                   = i_komv
        EXCEPTIONS
         mwskz_not_defined         = 1
         mwskz_not_found           = 2
         mwskz_not_valid           = 3
         steuerbetrag_falsch       = 4
         country_not_found         = 5
         OTHERS                    = 6
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    clear wa_taxcom.
    ENDLOOP.
    LOOP AT i_komv INTO wa_komv.
      CASE wa_komv-kschl.
    *EXCISE DUTY
        WHEN 'JMOP'.
          v_jmop = v_jmop + wa_komv-kwert.
    endcase.
    endloop.
    Hope this might be of some use.
    Regards,
    sirisha

  • How to get change log for z-fields in VBAk(Sales order)

    Hi All,
    Please help me in this.
    My requirement is get the change log for z-fields in sales order.
    In the sales order header level we have one tab Additioanl data.
    In this we have z-fields, if we change any of the field value, it is accepting the same and updating in data base as well.
    But it is not appearing in change log<. I.e. Environment->changes.
    How to get the change log for the z-fields.
    In data element level enable the check box of change document.
    Please help me in this.
    Thanks in advance
    Jaya,G

    Hi Jaya,
    For this you need to do some coding. Here is a link which tells you, step by step procedure how to activate Change log for the Z tables.
    THe Object that you need to use for Sales Document   is VERKBELEG
    [https://wiki.sdn.sap.com/wiki/display/ABAP/Maintaining%20Change%20Log%20for%20Database%20Tables]
    Hope this helps..
    This is Primarily a Technical Consultant Job. Take his help before you make any changes.
    Thnks
    Srini

  • How to get Panel coordinates

    Hi All,
                i have a panel in canvas layout.
               if want to add one more panel immediate  next to the first panel i need to know  x, y coordinate of the first panel.
                How can i know i the coordinates.
    Can any help me?
    thanks
    Raghu

    You can get the coordinates by:
    panelOne.x and panelOne.y
    panelOne is the id of your panel. e.g. <mx:Panel id="panelOne" ...>...</Panel>
    To add a new panel right next to it you have to set the x and y for the new panel like this:
    newPanel.x=panelOne.x+panelOne.width;
    newPanel.y=panelOne.y+panelOne.height;
    Hope this helps.

  • How to get the class name and field name dynamically

    Hi
    I have a class (ex: Contract) the fields (ex : a,b,c) .i need to get the class name and field name dynamically
    ex
    if( validation file for the field Contract.a){
    return contract.a;
    }else if(validation file for the field Contract.b){
    return contract.b;
    how to pass the field name and object dynamically
    Please help me .............
    Thanks in Advance..
    Edited by: 849614 on Aug 11, 2011 6:49 AM

    YoungWinston wrote:
    maheshguruswamy wrote:
    Agreed, but IMO, i still feel its best if there is no tie in between consumer class level details and the database it talks to. A service layer is needed in between them.Sounds like you've done a bit of this before. Me, I've either been a modeller/DBA, doling out data, or a nuts and bolts programmer (and actually more toolmaker than apps, but did a bit of that too).
    Do you know of a good book about the "middle ground" (ie, these service layers)? I understand it empirically, but haven't had a lot of exposure to it.
    Winston
    Edited by: YoungWinston on Aug 11, 2011 10:34 PM
    PS: Apologies. Edited my previous post, presumably while you were composing your reply, when I finally realized what '.filed' meant.Most of my work is in web development, never been a DBA :) . The biggest 'concern' in my shop is 'separation of concerns'. The UI group reports up to a different IT head, the DB group reports up to a different IT head and so on. The looser the coupling between these systems, the lesser the project costs (Integration, QA etc) are. Martin Fowler's books contain good information about separation of concerns in an enterprise environment. The two books which i recommend are
    [url http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420]Enterprise Application Architecture and
    [url http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=pd_sim_b_1]Enterprise Integration Patterns

  • How to get the length of a field.

    Hi all,
    I m working on dynamic internal table.There is a need to get the length of a field, filled dynamically.How can we get it.
    Thanks in advance.
    Regards,
    Swati garg

    Swati,
    DATA: text(8) TYPE c,
          len TYPE i.
    DESCRIBE FIELD text LENGTH len IN CHARACTER MODE.
    Field LEN contains the value 8.
    ================================
    For ouput length :
      DATA: float TYPE f,
          out TYPE i,
          len TYPE i.
    DESCRIBE FIELD float LENGTH len OUTPUT-LENGTH out.
    This example results in the field LEN containing the value 8, while the field OUT contains the value 22.
    Don't forget to reward if useful.....

Maybe you are looking for

  • Dump during BAPI_ENTRYSHEET_CREATE calling from Portal

    Hi, I am getting dump during creation of Service Entry Sheet using the 'BAPI_ENTRYSHEET_CREATE' when triggering it from Portal end. But if I directly call the FM from ECC6.0 with the same passing values it gives me the success meassage. The dump only

  • Data driven pages

    I am very new to SharePoint and have been researching for 2 weeks if it has the capability I am looking for but cannot seem to find an answer. What I am trying to do is to take a spreadsheet, or SharePoint list, with several pieces of information for

  • Can't download G450 Audio Driver

    Anyone can tell me another link to download this driver. Because until now I'm still fail to download it from Lenovo Consumer Support website at http://consumersupport.lenovo.com/en/DriversDownloads/drivers_list.aspx?CategoryID=370748 Thanks. Solved!

  • Obiee11.1.1.5.0(Software Only Install) windows 7  64bit Installation Error

    Hi, I have installed obiee11.1.1.5.0 on windows 7 OS with 64bit,while instalation i got below attached error..after that can't able to see sample dashboard on dahsboard page but all services are up only also i can able to login RPD in online mode,as

  • I upgraded my MacBookPro 10,1to Yosemite and the internet has become very slow on some sites.

    Problem description: Slower start up and some pages on internet take nearly a minute to load, compared with a second or 2 before Yosemite EtreCheck version: 2.1.6 (109) Report generated 20 January 2015 20:52:28 GMT Download EtreCheck from http://etre