Get field position using PHP or JavaSript

Hello guys! How can I get current position of some fields in Pdf form. For example, I have Pdf form with signature field. I need to get current page number and x, y position of this field. Can you give me some code example on PHP or JavaScript.
Thanks.

There's a big difference between doing it with JS and with PHP... Doing it with JS inside a PDF is very easy. The code will look something like this:
var f = this.getField("FieldName");
app.alert("Field page: " + f.page):
app.alert("Field location: " + f.rect);
Here I'm just outputting it to an alert window... You can do something else with it, of course.

Similar Messages

  • Getting raise_application_error code using  php

    I have a trigger that catches an action and returns a raise_application_error. I am having a hard time finding out how to retrieve the error code (I defined it) using php code.
    here is an example of the php/oracle error message that I get:
    Warning: OCIStmtExecute: ORA-21000: error number
    argument to raise_application_error of -2006 is
    out of range ORA-06512
    I can retrieve the oracle predefined error code (21000) using
    $oci_error = OCIError($statement);
    $oci_error["code"];
    but do not know how to get the (-2006) except maybe parseing the $oci_error["message'].

    nevermind, figured it out. my raise_application_error was out of range (like the error message said O=) )
    changing it to -20006 (instead of -2006) works.
    karn

  • [CS4/JS] get guide position using script label

    Hello Scripters,
    I am trying to get the position of some specific guides of my masterspread, the following code snippet doesnt work:
         var myMasterSpread = myDocument.masterSpreads.itemByName("A-Master");
         var myX1 = myMasterSpread.guides.itemByName("Guide_left").location;
    What could be wrong?
    Thanks in advance for any help!
    Franziska

    The combination of labels and guides does not work.
    It has been discussed before, somewhere on this forum (I think it was concluded with "Adobe has to fix this").

  • How to get field data using a formula

    I have a table with fields ‘pension contribution’ and ‘current year’.The first field stores a single record for a given year.Say if ‘current year’ is 2014 ‘pension contribution’ is 7% and so on.
    I wanted to get a result by providing a certain year from another field in a table using a formula.
    How do I do this?An explanation would be helpful.

    Hi Nebil,
    You can't! You'll need to join the the two tables or use a Subreport.
    -Abhilash

  • Incorrect field positioning using IAC

    Hi,
    we're using IAC to display an SAP transaction - PR05. We've added our own fields (checkboxes) to the 'additional data' tab and they are all lined up correctly in the GUI but when we display the transaction in the portal they are not lined up. Not a massive problem but one we'd like to correct. Can anyone help please ?
    e.g.
    field 1        []
    field 2        []
    field 3        []
    field 4   []
    thanks,
    Malcolm.

    anyone ?

  • Code to get friend list using PHP

    Hi all ,
    I need to know how to bring the friendlist of a particullar user from it's email-id as user id in an application.
    Thanks and regards,
    Deekay.

    Hi all ,
    I need to know how to bring the friendlist of a particullar user from it's email-id as user id in an application.
    Thanks and regards,
    Deekay.

  • Parsing pdf form using PHP or JavaScript

    Hello! How can I parse Pdf file with form to get fields position and page # of it?
    For example, there are some pdf with structure like this:
    <</AcroForm 23 0 R/Metadata 2 0 R/Outlines 6 0 R/Pages 9 0 R/Type/Catalog>>
    endobj
    19 0 obj
    <</DA(/ZaDb 0 Tf 0 g)/FT/Btn/Ff 49152/Kids[18 0 R 20 0 R]/T(Language)>>
    endobj
    23 0 obj
    <</DA(/Helv 0 Tf 0 g )/DR<</Encoding<</PDFDocEncoding 26 0 R>>/Font<</Helv 22 0 R/ZaDb 35 0 R>>/XObject<</DSz 51 0 R>>>>/Fields[19 0 R 21 0 R 39 0 R 16 0 R 17 0 R 46 0 R 47 0 R 48 0 R]/SigFlags 1>>
    endobj
    25 0 obj
    <</BBox[0.0 0.0 72.0 20.0]/FormType 1/Length 102/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</Font<</Helv 22 0 R>>/ProcSet[/PDF/Text]>>/Subtype/Form/Type/XObject>>stream
    1 g
    0 0 72 20 re
    f
    /Tx BMC
    q
    2 1 68 18 re
    How can I get field position from this code using PHP or JavaScript?
    Thanks.

    I solve my problem using Itext Pdf Library for Java. See here: http://stackoverflow.com/questions/19066141/itext-get-field-coordinate s-from-existing-pdf

  • How to get the position of a tag in XML,when i am using the org.xml.sax

    Hi,
    I am able to parse a xml document.I want to get the position of a tag in the document.So that by keeping that as reference, i can access other tags.Plz help me.I am using org.xml.sax API.

    Hello Friends
    After research , I could also find another way to check the existence of a node .We can even use CHOOSE to check the existence.
    <xsl:choose>
          <xsl:when test="(/mynode)">
              your action if the mynode is found
          </xsl:when>
          <xsl:otherwise>
                    action if mynode is not found
          </xsl:otherwise>
    </xsl:choose>
    Thanks.
    Wishes
    Richa

  • How to get field separator in flat file using GUI_DOWNLOAD function

    hi,
    how to get field separator in flat file using GUI_DOWNLOAD function.
                                    thanking you.

    Hi,
      Use WRITE_FIELD_SEPARATOR = 'X'.
      Check this sample code
    REPORT  z_file_download.
    DATA: w_name(90) TYPE c.
    DATA:
      BEGIN OF fs_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        price    LIKE sflight-price,
        currency LIKE sflight-currency,
      END OF fs_flight.
    DATA:
      BEGIN OF fs_head,
        carrid(10) TYPE c,
        connid(10) TYPE c,
        fldate(10) TYPE c,
        price(10) TYPE c,
        curr(10) TYPE c,
      END OF fs_head.
    DATA:
      t_head LIKE
       TABLE OF
             fs_head.
    DATA:
      t_flight LIKE
         TABLE OF
               fs_flight.
    fs_head-carrid = 'CARRID'.
    fs_head-connid = 'CONNID'.
    fs_head-fldate = 'FLDATE'.
    fs_head-price  = 'PRICE'.
    fs_head-curr   = 'CURRENCY'.
    APPEND fs_head TO t_head.
    SELECT-OPTIONS:
      s_carrid FOR fs_flight-carrid.
    START-OF-SELECTION.
      SELECT carrid
             connid
             fldate
             price
             currency
        FROM sflight
        INTO TABLE t_flight
       WHERE carrid IN s_carrid.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        filename                      = 'D:\flight.xls'
       FILETYPE                      = 'ASC'
    *   APPEND                        = ' '
        WRITE_FIELD_SEPARATOR         = 'X'
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    *   CONFIRM_OVERWRITE             = ' '
    *   NO_AUTH_CHECK                 = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   WRITE_BOM                     = ' '
    * IMPORTING
    *   FILELENGTH                    =
      tables
        data_tab                      = t_head
    EXCEPTIONS
       FILE_WRITE_ERROR              = 1
       NO_BATCH                      = 2
       GUI_REFUSE_FILETRANSFER       = 3
       INVALID_TYPE                  = 4
       NO_AUTHORITY                  = 5
       UNKNOWN_ERROR                 = 6
       HEADER_NOT_ALLOWED            = 7
       SEPARATOR_NOT_ALLOWED         = 8
       FILESIZE_NOT_ALLOWED          = 9
       HEADER_TOO_LONG               = 10
       DP_ERROR_CREATE               = 11
       DP_ERROR_SEND                 = 12
       DP_ERROR_WRITE                = 13
       UNKNOWN_DP_ERROR              = 14
       ACCESS_DENIED                 = 15
       DP_OUT_OF_MEMORY              = 16
       DISK_FULL                     = 17
       DP_TIMEOUT                    = 18
       FILE_NOT_FOUND                = 19
       DATAPROVIDER_EXCEPTION        = 20
       CONTROL_FLUSH_ERROR           = 21
       OTHERS                        = 22
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'D:\flight.xls'
          filetype                = 'ASC'
          append                  = 'X'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_flight
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc EQ 0.
        MESSAGE 'Download successful' TYPE 'I'.
      ENDIF.
      IF sy-subrc <> 0.
    *  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • How to get a field that using variable in order to create a query

    Hi,
    I found a difficulty when creating a query. so, I would like to ask you some question.
    1. How to get a field that using variable which that field I want to put it in my query?
    For example, I would like to take quantity field in inventory audit report. And when I put my cursor in
    quantity field, there was only variable, item, etc. How to get this and put it in query?
    2. How to combined the invoice quantity with inventory audit report quantity?
    3. I have a query like this:
    SELECT distinct T0.[DocDate] as 'Tanggal', T0.[DocNum] as 'No.Faktur', T1.[ItemCode] as 'Kode Barang',
    T1.[Dscription] as 'Deskripsi', T1.[Quantity] as 'Quantity', ((T1.[LineTotal])/(T1.[Quantity])) as 'Harga
    Satuan', T1.[LineTotal] as 'Harga Total', T3.[CalcPrice] as 'HPP Satuan', ((T3.[CalcPrice]) * (T1.
    [Quantity])) as 'HPP Total', T4.[ItmsGrpNam] as 'Jenis Barang', T5.[SlpName] as 'Nama Sales', T1.
    [WhsCode] as 'Kode Gudang' FROM [dbo].[OINV] T0 INNER JOIN [dbo].[INV1] T1 ON T0.DocEntry =
    T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OINM T3 ON T2.ItemCode
    = T3.ItemCode INNER JOIN OITB T4 ON T2.ItmsGrpCod = T4.ItmsGrpCod INNER JOIN OSLP T5 ON
    T0.SlpCode = T5.SlpCode WHERE T3.[TransType] = '13' and T3.[CreatedBy] = T1.[DocEntry] and T0.
    [DocDate] >=[%0] and T0.[DocDate] <=[%1] and T4.[ItmsGrpNam] =[%2] and T1.[WhsCode] =[%3]
    Is it possible if I just take one invoice with invoice quantity and only show up at once although I have a
    lot item cost for that item? (because I'm using FIFOmethod).
    Please help me.. cause I'm stuck with this thing :l.
    Thank you very much, and I'm waiting your respon soon.
    Regards,
    Sisca

    Try this one:
    SELECT distinct T0.DocDate as 'Tanggal', T0.DocNum as 'No.Faktur', T1.ItemCode as 'Kode Barang',
    T1.Dscription as 'Deskripsi', T1.Quantity as 'Quantity', ((T1.LineTotal)/(T1.Quantity)) as 'Harga
    Satuan', T1.LineTotal as 'Harga Total', T3.CalcPrice as 'HPP Satuan', ((T3.CalcPrice) * (T1.
    Quantity)) as 'HPP Total', T4.ItmsGrpNam as 'Jenis Barang', T5.SlpName as 'Nama Sales', T1.
    WhsCode as 'Kode Gudang'
    FROM dbo.OINV T0 INNER JOIN dbo.INV1 T1 ON T0.DocEntry =T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OINM T3 ON T2.ItemCode = T3.ItemCode AND T3.TransType = '13' and T3.CreatedBy = T1.DocEntry AND T3.Warehouse = T1.WhsCode
    INNER JOIN OITB T4 ON T2.ItmsGrpCod = T4.ItmsGrpCod
    INNER JOIN OSLP T5 ON T0.SlpCode = T5.SlpCode
    WHERE T0.DocDate >=[%0\] and T0.DocDate <=[%1\] and T4.ItmsGrpNam =[%2\] and T1.WhsCode =[%3\]
    Thanks,
    Gordon

  • How to register User custom field using PHP?

    Hi!
    I am looking for a way to share user specific data between connected users. For example, all participants should know each other IDs(our own system IDs, not LCCS).
    User's custom fields looks the best solution for this, but I can't find a way to register one using PHP, while creating room.
    How to register User's  custom field using PHP? Or may be there are better solution to make such things?

    Got it, just need to add new node to UserManager collection.
    const USER_MANAGER_COLLECTION = 'UserManager';
    static private $USER_MANAGER_CUSTOM_FIELD_CONFIGURATION = array(
       'accessModel'=>self::ROLE_VIEWER,
       'publishModel'=>self::ROLE_VIEWER,
       'persistItems'=>true,
       'modifyAnyItem'=>false,
       'userDependentItems'=>true,
       'sessionDependentItems'=>false,
       'itemStorageScheme'=>self::STORAGE_SCHEME_MANUAL,
       'allowPrivateMessages'=>true,
       'lazySubscription'=>false,
       'p2pDataMessaging'=>false
    const USER_INVITE_ID_CUSTOM_FIELD = 'inviteId';
    static private function createUserManagerCustomFields($room){
       $account = self::init();
       $collection = self::USER_MANAGER_COLLECTION;
       $account->subscribeCollection($room, $collection);
       $account->createNode($room, $collection, self::USER_INVITE_ID_CUSTOM_FIELD, self::$USER_MANAGER_CUSTOM_FIELD_CONFIGURATION);

  • How to get the position of the stem in control valve using slider control in the front panel

    I have created a calibration program for a control valve. Signal (4-20mA) is generated from labview using slider contorl which is given to the valve via DAQ(module 9265) and again the feedback signal from the valve is acquired using DAQ(module 9203).. . There is an input ISO/ISC(Increasing signal to open/ Increasing signal to close) in the front panel.
    ISO would set the output to increase from (4-20)mA further opening the valve
    ISC would set the output to increase from (4-20)mA further closing the valve
    I have doubt, how can i get the position of a stem

    Ravens Fan wrote:
    If the position of the stem is being sent to the PC through a 4-20 mA signal into your DAQ 9203 module, then you just need to do an analog input read in order to get the signal.
    When reading this post, that is what came to mind...  So let's see if both RavensFan & I are trying to understand the same thing...  Are you saying that the position of the stem is linear (or scaled) to the amount of current sent to it?  Meaning a 4mA signal would move it a certain distance, and 10mA would move another given / known distance?  Or are you saying that it is calibrated so that a 20mA signal for a certain duration (ms) would move it a given distance? So the scale would be time and not current unless a lookup table is used to adjust the time duration based on the current being drawn...
    It's just that I am not familiar with solenoid / drive devices that related to current..  To voltage, yes.  To time, yes..  To current, I'm simply saying that I am not familiar with that.  Can you tell us more about this stem (mfg / model designation)?

  • Field is in DB table/alias but I get ORA904 error using it in OBIEE Answers

    Hello, I'm very new at developing with RPD and OBIEE tools, so I'm struggling with something that I thought I did correctly. I added a new field to a database table, and can query it in the database. I added it to the table in RPD Physical layer and I verified that it also now exists in an alias of that table. The physical alias table field is used as a source for a logical column in the presentation layer. Everything looks good in the RPD. But when I try to pull it up in a query in OBIEE Answers I get a 904 error telling me that the column does not exist. I've bounced the servers, dropped cookies and cache, but nothing helps - I still get the error.
    What step could I have missed?
    Thanks in advance!
    Rich

    THank you all for the advice, but it still appears to be a problem. Here's what I tried and the results:
    1. Right-clicked on the new column to do a row count update. As predicted by Gaurav, this also failed with a 904 error.
    2. Verified exact spelling is correct.
    3. Checked the connection pool. THis looks correct, but I will double-check today with one of my co-workers who has more experience with RPD.
    4. Tried querying the column in RPD - this also failed with 904 error.
    5. Checked the LTS within BMM layer and my new field does map back to the alias column
    6. Ran a consistency check and the only errors (warnnings actually) are for a different, unrelated table.
    7. Checked security and it also looks okay, but this is another one I'll double-check later with one of our experts here.
    8. Joins in physical layer and BMM look good
    9. Checked physical column and table in the presentation layer. These also point to the right columns/tables
    10. Selecting the column by itself in analysis fails with 904.
    If anyone can think of something else to consider based on this please advise. One thing I did notice is that in performing the steps above I noticed somewhere (the BMM I think) that the new column I added is at the bottom of the table (last field) and not in the middle as it is in the database. In past experience with other tools this hasn't mattered, but I'm going to see if I can change that and if that has an effect. I'm guessing it won't but I'm running out of ideas!
    Thanks again,
    Rich

  • Using Mac OS on multiple monitor is great, but after removing external monitor (2nd monitor) usually windows position originally on the external monitor doesn't get re-positioned to default monitor. Is there any shortcut key or utilities that can reset wi

    Using Mac OS on multiple monitor is great, but after removing external monitor (2nd monitor) usually windows position originally on the external monitor doesn't get re-positioned to default monitor. Is there any shortcut key or utilities that can reset wi

    Got the "apple firewire ntsc" choice to show up even if grayed out and "missing" under "audio/visual" menus by recreating choices in Easy Setup under "final cut pro" MENU thank GOODNESS because I was reading horror stories on here about this under another thread with someone trashing preferences, reinstalling and the works and still not getting it to show up...on my search now for an analog/digital converter up at b&h...find it odd that the s video connector wouldn't show the crt monitor when I put both displays through the 3870...I switched it back to see if it worked again when only the one dell monitor display was there and there it is again mirroring the screen display on my desktop...just can't be seen as an "external monitor" in fcp...couldn't find anything specific in the shane ross threads to this. I'm sad the program doesn't just see the s video connection though the 3870 though my computer does fine and will query up at b&h in regard to what might be affordable as far as a digital/analog converter. It's also weird in itself that when I put the two dell monitors on the one card my computer no longer could see the s video crt connection...makes no sense. Will report in later as to what I discover up at b&h as I'm sure there's a world of people out there using this sony crt monitor still even into the upgrades with computers and software so I imagine therein lies the solution. Thanks again and I'll report in as to what hardware might be suggested for me.

  • Is it possible to get the position of a charcter from a string ?

    Hi !
    Is it possible to get the position of a charcter from a string ?
    Example:
    @VAR contains the following text "ABCDEFGHIJKLM"
    I'am seaching for FGH, it start on pos. 6 en ends on pos 8.
    How can I get these numbers 6 and 8 ?
    So, I can use them in the MID(text,start,len) function.
    Thanks!

    Hi Sooraj,
    I'll explain more in detail:
    From a web-service I get a variable called @Spec.
    This variable contains the following:
    "MOTORTYPE[CR]D-QW1234[LF]PART[CR]1234-FRD-X[LF]"
    or
    "MOTORTYPE[CR]ABC[LF]PART[CR]E-435[LF]"
    I need the values behind MOTORTYPE[CR] and behind PART[CR]
    But you’ll see that the positions of these values are different each time.
    If there is a way to get the (start) position of "MOTORTYPE[CR]" or "PART[CR]" and the (end) position of the first "[LF]" behind that,
    then I could use the MID() function to get the correct values.
    The values will be displayed in a table view (between other fields).
    An ABAP-call/function won’t work . . . how should I invoke this within a table column/field object ? (system action ?)

Maybe you are looking for