Compare PDF fields XML imported in a loop

Hello

At first, I am a newbie in Acrobat and Javascript.

I create a PDF with Acrobat Pro form, my next idea is to fill out the PDF with the related data via an XML Import.

Real, I can import the xml file and fill the fields PDF hard-coded, it already works via Javascript.

My real problem is, I want to fill the PDF with the XML data via a loop for, because we want to use this script in several PDF forms and not each form has the same number of fields.

Here my script to work:

var xmldoc = util.readFileIntoStream ();

xmlString var = util.stringFromStream ();

var myXML = XMLData.parse (xmlstring, false);

var oNode = XMLData.applyXPath(myXML,"//Customer");

this.getField("CustomerName").value = oNode.Customer.CustomerName.value;

this.getField("CustomerStreet").value = oNode.Customer.CustomerStreet.value;

this.getField("CustomerPlace").value = oNode.Customer.CustomerPlace.value;

this.getField("CustomerSiteName").value = oNode.Customer.CustomerSiteName.value;

this.getField("CustomerSiteStreet").value = oNode.Customer.CustomerSiteStreet.value;

this.getField("CustomerSitePlace").value = oNode.Customer.CustomerSitePlace.value;

Here my problem

for (var i = 0; i < oNode.length; i ++) {}

If (this.getField (?) == oNode.Order.?) {

this.getField (?.) [i]). value = oNode.Order. ??? [i] .value;

}

}

I hope that everyone understands what I mean and can help me.

THX in advance

Concerning

Dirk

Hello try67,

Thank you.

As a first step, I see, with getNthFieldName and numFields, all fields in the PDF file now, but I have no idea how to do to access the fields of the XML file.

Thank you in advance.

Tags: Acrobat

Similar Questions

  • Action Wizard xml import into form

    Hello world

    I created an action in Acrobat XI the wizard action by batches of files xml export of pdf forms which were filled. However I can't see a way to create an action to do the opposite in the action Wizard: import of xml files of batch in a corresponding empty pdf form (the form fields and xml corresponding already perfectly). Import an xml file into my blank pdf form works when I go to forms-> form several options-> import data, find the xml file and fill it the form perfectly. Then "Save as" with the name of the xml file, but with extension pdf, of course and I'm done. This process takes about 25 seconds for a file. The problem is that I have to do this 700 times. I thought to avoid the step of "save under" with a directory containing 700 xml files and Virgin 700 pdf forms with name matching (Jean - doe.xml and Jean - doe.pdf, etc.), but still, I do not see a way to build action.

    Any ideas or advice you have are greatly appreciated. I thank very you much for your time and help!

    Chris

    Try using this code:

    this.importAnXFDF(this.path.replace(/pdf$/i, "xml");
    
  • Keep adding values to the PDF-field

    Hello

    I have a PDF field called additional information which I have to add a set of data one line after another.

    For example:

    1 Visted Mexico in 2009 for 2 weeks.

    2 Visted Paraguay in 2011 for 5 days.

    3 and so on.

    Since these data must be assembled from different files, I am looping through the information and try to continue to add to this area.

    However I'm unable to add to the values in the field. Only the last line is affected.

    How can I activate the field to add more values line after line because they are assigned?

    Any help is appreciated!

    Thank you.

    To add, you take the current value and paste the new value at the end, then store it back. Add new lines if necessary.

  • compare the fields of two queries

    I need to compare the fields of two queries.

    I went through many articles to asktom help operator less. but I'm not convinced by this method.

    Comaprisons are for about 10 fields.

    So I'm planing to do using sliders and nested loops. performance can be a problem.

    Please give your suggestions or solutions.

    OK, using the data you provided, I get this:

    with map_test_fac as (select 100 idid, 789 ifid, 300 edid, 741 efid from dual union all
                          select 100 idid, 123 ifid, 300 edid, 963 efid from dual union all
                          select 100 idid, 456 ifid, 300 edid, 258 efid from dual),
             test_fac as (select 741 facid, 'ETY' type, 'EUR' ccy, 'Ext' src, 300 did from dual union all
                          select 789 facid, 'WE' type, 'EUR' ccy, 'Int' src, 100 did from dual union all
                          select 123 facid, 'VPR' type, 'EUR' ccy, 'Int' src, 100 did from dual union all
                          select 456 facid, 'ETY' type, 'USD' ccy, 'Int' src, 100 did from dual union all
                          select 963 facid, 'WE' type, 'EUR' ccy, 'Ext' src, 300 did from dual union all
                          select 258 facid, 'VPR' type, 'EUR' ccy, 'Ext' src, 300 did from dual)
    -- end of mimicking your data: USE SQL below:
    select tfi.facid int_facid,
           tfi.type int_type,
           tfi.ccy int_ccy,
           tfi.src int_src,
           tfi.did int_did,
           tfe.facid ext_facid,
           tfe.type ext_type,
           tfe.ccy ext_ccy,
           tfe.src ext_src,
           tfe.did ext_did
    from   test_fac tfi,
           test_fac tfe,
           map_test_fac mtf
    where  mtf.ifid = tfi.facid
    and    mtf.efid = tfe.facid
    and    mtf.idid = tfi.did
    and    mtf.edid = tfe.did
    and    (tfi.type != tfe.type
            or tfi.ccy != tfe.ccy)
    
     INT_FACID INT INT INT    INT_DID  EXT_FACID EXT EXT EXT    EXT_DID
    ---------- --- --- --- ---------- ---------- --- --- --- ----------
           789 WE  EUR Int        100        741 ETY EUR Ext        300
           123 VPR EUR Int        100        963 WE  EUR Ext        300
           456 ETY USD Int        100        258 VPR EUR Ext        300
    

    However, I think that your mapping data is incorrect, so with keys of information:

    with map_test_fac as (select 100 idid, 789 ifid, 300 edid, 963 efid from dual union all
                          select 100 idid, 123 ifid, 300 edid, 258 efid from dual union all
                          select 100 idid, 456 ifid, 300 edid, 741 efid from dual),
             test_fac as (select 741 facid, 'ETY' type, 'EUR' ccy, 'Ext' src, 300 did from dual union all
                          select 789 facid, 'WE' type, 'EUR' ccy, 'Int' src, 100 did from dual union all
                          select 123 facid, 'VPR' type, 'EUR' ccy, 'Int' src, 100 did from dual union all
                          select 456 facid, 'ETY' type, 'USD' ccy, 'Int' src, 100 did from dual union all
                          select 963 facid, 'WE' type, 'EUR' ccy, 'Ext' src, 300 did from dual union all
                          select 258 facid, 'VPR' type, 'EUR' ccy, 'Ext' src, 300 did from dual)
    -- end of mimicking your data: USE SQL below:
    select tfi.facid int_facid,
           tfi.type int_type,
           tfi.ccy int_ccy,
           tfi.src int_src,
           tfi.did int_did,
           tfe.facid ext_facid,
           tfe.type ext_type,
           tfe.ccy ext_ccy,
           tfe.src ext_src,
           tfe.did ext_did
    from   test_fac tfi,
           test_fac tfe,
           map_test_fac mtf
    where  mtf.ifid = tfi.facid
    and    mtf.efid = tfe.facid
    and    mtf.idid = tfi.did
    and    mtf.edid = tfe.did
    and    (tfi.type != tfe.type
            or tfi.ccy != tfe.ccy)
    
     INT_FACID INT INT INT    INT_DID  EXT_FACID EXT EXT EXT    EXT_DID
    ---------- --- --- --- ---------- ---------- --- --- --- ----------
           456 ETY USD Int        100        741 ETY EUR Ext        300
    

    That's more like what you're looking for?

  • PDF in XML

    Hi, I need to know if cuantan with any product that converts PDFs to structured xml

    flow:

    * Recepcionan layered pdf

    * They convert pdf to xml ordered and structured

    Hi juacarlosq77370497,

    You can use Adobe Acrobat DC application to convert PDF to XML format.

    For more information, please see this KB doc: formats export PDFs to Microsoft Office, Adobe Acrobat DC | Adobe Acrobat DC tutorials

    Let us know if you need help.

    Kind regards

    Meenakshi

  • Compare two fields in Eloqua API

    Is it possible to compare two fields Eloqua in the searchQuery of the Eloqua API calls in c# for example. searchQuery = "C_DateModified = C_DateCreated"?

    Unfortunately, this can not be done.

  • I get the error 'Save as has been unable to find the tables in this document. No file has been created"when I convert my article PDF worksheet XML 2003 using c#.

    Hi all

    I want to change this PDF Spreadsheet XML.

    The code is

    ADOc AcroAVDoc = new AcroAVDoc();

    RPSC AcroPDDoc = new AcroPDDoc();

    String path = "";

    ADOC. Open (folderPath + @"\" + Pathnew1.Split('\\') [8]. Split('.') [0] + « .pdf », « ») ;

    RPSC = adoc (AcroPDDoc). GetPDDoc();

    js object is pdoc. GetJSObject();

    JS = Acropddoc.GetJSObject ();

    Type T = js. GetType();

    String vFile = pdoc. GetFileName();

    total number of pages

    Double nPages = ((double) T.InvokeMember)

    "numPages."

    BindingFlags.GetProperty |

    BindingFlags.Public |

    BindingFlags.Instance,

    NULL, js, null);

    path = Pathnew1.Split('\\') [8]. Split('.') [0] ;

    Object [] saveAsParam is {path + '.xml', 'com.adobe.acrobat.spreadsheet'};.

    T.InvokeMember)

    "Save as."

    BindingFlags.InvokeMethod |

    BindingFlags.Public |

    BindingFlags.Instance,

    null, js, saveAsParam);

    }

    Screenshot (24).png

    Is there no tables in the document then it is simply not the action just to try. Data retrieval is from guess what is a cell, row and column; the results are often uncertain and should be checked carefully. Your document must not look enough like a spreadsheet. This isn't a problem with the API.

  • Compare two fields...

    I want to compare two fields in a table with two fields from another table...
    as (table1. Column1 and table1.column2) = (table2.column1 and table2. Column2)
    Any help to solve?

    Sorry guys!

    In fact, it is very simple... Likewise, it is the usual way to compare 2 tables as (table1.col1 = table2.col1 and table1.col2 = table2.col2).
    I can get my output desired with this condition itself... I wrongly thought it's complicated...

    In any case thanks for your precious time!

  • By comparing the fields on a JSPX

    OK, this should not be difficult, but I can't find anything on it.

    I want to do is compare two fields, in this case the dates on a form.

    Now, the tricky part seems to get values that are CURRENTLY in the form of type.

    I need a way to see what the user has typed currently on the form. Why is it so difficult? (or apparently?)

    He compares the value that was stored in the line, but this will only confuse the user:

    ' Public Sub StartDate_validator (FacesContext facesContext, UIComponent uIComponent object pObject)
    {
    RichInputDate vReturnDateComponent = uIComponent.findComponent ("id1") (RichInputDate);
    VReturnDate = vReturnDateComponent.getValue () (Date);
    Day vStartDate = pObject of (Date);
    System.out.println ("to start date" + vReturnDate.compareTo (vStartDate));

    If (vReturnDate.compareTo (vStartDate) < 0)
    {
    throw new ValidatorException (new FacesMessage (FacesMessage.SEVERITY_ERROR, "invalid leave", null));
    }
    }

    ' Public Sub ReturnDate_validator (FacesContext facesContext, UIComponent uIComponent object pObject)
    {
    RichInputDate vStartDateComponent = uIComponent.findComponent ("id2") (RichInputDate);
    VStartDate = vStartDateComponent.getValue () (Date);
    Day vReturnDate = pObject of (Date);
    System.out.println ("on the date of return" + vReturnDate.compareTo (vStartDate));

    If (vReturnDate.compareTo (vStartDate) < 0)
    {
    throw new ValidatorException (new FacesMessage (FacesMessage.SEVERITY_ERROR, "invalid return", null));
    }

    }

    < af:panelGroupLayout id = "pghb" layout = "vertical" >
    < af:inputDate value = "#{bindings." AutoSubmit DepartDate.inputValue}' = 'true '.
    label = "#{bindings." DepartDate.hints.label}.
    required = "#{bindings." DepartDate.hints.mandatory}.
    shortDesc = "#{bindings." DepartDate.hints.tooltip}"id ="id2 ".
    immediate = "true".
    Validator = "#{backingBeanScope.UpdateTABean.StartDate_validator}" >
    < f: validator binding = "#{bindings." DepartDate.validator} "/ >"

    <!-->
    < af:convertDateTime pattern = "#{bindings." DepartDate.format} "/ >"
    < / af:inputDate >
    < af:inputDate value = "#{bindings." AutoSubmit ReturnDate.inputValue}' = 'true '.
    label = "#{bindings." ReturnDate.hints.label}.
    required = "#{bindings." ReturnDate.hints.mandatory}.
    shortDesc = "#{bindings." ReturnDate.hints.tooltip}"id ="id1"immediate ="true ".
    Validator = "#{backingBeanScope.UpdateTABean.ReturnDate_validator}" >
    < f: validator binding = "#{bindings." ReturnDate.validator} "/ >"
    < af:convertDateTime pattern = "#{bindings." ReturnDate.format} "/ >"
    < / af:inputDate >
    < / af:panelGroupLayout >

    Thank you

    Jet

    Hello

    Try to set up each component of entry as one partialTrigger on the other. I think it should work.

    It has to do with the life cycle JSF/ADF. It becomes a bit complicated because of the autoSubmits and the immediate you have on components. Learn more about the cycle of life and its variants here: http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_lifecycle.htm

  • Table of contents via XML import?

    I understood how to export the table of contents via XML.  The generated .xml contains fairly simple tags is easy to understand and would be simple to build in another tool.  There are XML import, but he seems to want to only import the XML file as content, and not as the table of contents.

    If I want to create this new table of contents in the format XML file using another tool and then import it into the RoboHelp project to replace the void that is, after I imported a bunch of WinHelp files, how can I do this?  I did a lot of research in the application, within the help, etc., online search and come up emptyhanded.

    Am I stuck at absolutely having to create and maintain the table of contents in RoboHelp?

    That's the one.

    See www.grainge.org for creating tips and RoboHelp

  • Need help with XML import

    I created the project using jdevelopr.
    locally, it works fine.
    I moved all my files from my development instance.

    trying to IMPORT an xml file using the following observation.

    When I try to import xml AU_TOP rum.

    I am getting error "java denied execute permission.

    Same as I did chmod - A - R 777
    Should I do something else?

    If I run of webui where my pg.xml is available, I get java not found error.

    PL. Let me know where I need to run this file

    Also, pl. check the import xml command I use to import


    Java oracle.jrad.tools.xml.importer.XMLImporter
    /oradev2/test/testcomn/Java/xxhr/Oracle/Apps/xxhr/selfservice/personalaction/WebUI/XXHRPersonalActionSearchPG.XML
    / oradev2/test/testcomn/java/xxhr/oracle/apps/xxhr/selfservice/personalaction/webui - rootdir/userId - apps
    rootPackage - / oradev2/test/testcomn/java/xxhr/oracle/apps/xxhr/selfservice/personalaction/webui /.
    apps - username username-password apps - dbconnection ' (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=10.1.4.57) (PORT = 1528)) (CONNECT_DATA = (SID = dev))) ".


    PL. Let me do I need to do any authorization or what the problem is.

    pl in a timely response.

    Thanks in advance
    Siva

    Yes, you can run it from any path (if you all the access path to the command)

  • generated writing XML to a file after comparing with other XML

    Hello

    I made the comparison of the two XML now, I have an obligation to concat these two xml but also necessary to add the XML code with a status node that is after comparing the two displayed XML is Y or N, so if it is there then a node with

    < status > Y < / status >

    < of table > t1 < / table >

    then by completing the tasks that I have to write to a file

    declare

    p_emp_info CLOB.

    l_emp_tab xmlsequencetype: = xmlsequencetype();

    BEGIN

    I'm IN (SELECT id from emp WHERE emp_name = 'ABC') LOOP

    l_emp_tab.extend;

    SELECT XMLELEMENT ("ABCD",

    XmlElement ("ID", i.ID))

    IN l_emp_tab (i)

    FROM dual;

    END LOOP;

    SELECT XMLELEMENT ("EMP"

    XMLAGG (t.column_value))

    IN p_emp_info

    TABLE (l_emp_tab) t;

    -Dbms_Output.put_line (getclobval (1,2));

    EXCEPTION

    WHILE OTHERS THEN

    Dbms_Output.put_line(SQLCODE||) SQLERRM);

    END;

    I'm using this query, but it gives me an error that the expression is of the wrong type on this line {IN l_emp_tab (I)}

    I am unable to find the error what I'm missing here!

    You have changed the data type of I the example that Odie that gave you in

    repeating nodes using loop but when XML string concating then concating only last iteration of the loop FOr?

    In his case, I was a number.  In your code above, I have now is the set of rows in a cursor.

    You can rewrite your version to look like

    declare
      p_emp_info     XMLTYPE;
      l_emp_tab      xmlsequencetype := xmlsequencetype();
      l_pos          PLS_INTEGER;
    
      CURSOR c_info IS
        SELECT id
          from emp
         WHERE emp_name='ABC';
    
    BEGIN
    
      FOR r_info IN c_info LOOP
        l_emp_tab.extend;
        l_pos := c_info%ROWCOUNT;
        SELECT XMLELEMENT("ABCD",
               XMLELEMENT("id",r_info.id))
          INTO l_emp_tab(l_pos)
          FROM dual;
      END LOOP;
      SELECT XMLELEMENT("EMP"
                           ,XMLAGG(t.column_value))
        INTO p_emp_info
        FROM TABLE(l_emp_tab) t;
    
      --Dbms_Output.put_line(p_emp_info.getclobval());
    END ;
    

    You can use the % c_info number of LINES in the INTO clause, hence the l_pos.

    Or you can rewrite to be

    declare
      p_emp_info   XMLTYPE;
      l_clob       CLOB;
    BEGIN
    
      SELECT XMLElement("EMP",
               XMLAgg(XMLElement("ABCD",
                        XMLElement("id",e.id))))
        INTO p_emp_info
        FROM emp e
       WHERE emp_name = 'ABC';
    
      SELECT XMLSERIALIZE(DOCUMENT p_emp_info AS CLOB)
        INTO l_clob
        FROM DUAL;
    
      Dbms_Output.put_line(l_clob);
    END;
    

    Both produce the same XML file.

  • Compare PDF auto

    Please someone tell me how to compare two pdf files to get a consolidation report using javascript

    Your options to do with JS are extremely limited. Basically, the only thing you can compare are the textual content of the files, as well as some meta-objects like comments, fields, links, bookmarks, etc..

  • Organize PDF fields to populate the columns in the order in Excel

    I created a PDF form to transfer customer data received by the *.xml format, but the headers of the columns (field names) and data (field entries) fill on the same line in Excel.  Is there a way to define a the names of the fields to fill in a specific order in the first line and field entries to fill in the second row?  If not, is there a simple function to rearrange the data in Excel?

    Any help would be greatly appreciated.

    If you export data to a text file, it will be a file delimited by tabs that you can open in Excel with the field names in the first row and their values in the second.

    If you want to customize the order of the fields, you must use a script, however.

  • extract the pdf form xml data

    Hello

    What are the conditions to be able to extract data from a pdf form? I thought, that it is necessary to have the XML schema data connection and that all fields in the form must be bound to this data connection.

    But today I found, that domains can use the right connection 'use name (FieldName)', it's something by default - and that explicit data connection is necessary for this purpose.

    What is the common approach to the design of forms, which must be extracted by LC processFormSubmission?

    Thank you.

    All the data that is retrieved from an XFA form designed will be in xml format. The question then becomes how to control the format of the data that results. By default, the xml structure will follow the hierarchy (it is the Fieldname binding or binding normal use). If you want the data to follow a particular structure (so that you can use it with other systems that have a specific format) so that's when you would use sample XML or a schema in the data connection. Then by nodes of connection in the connection data in the fields, the form knows how to create the desired structure. If the structure is unimportant, then just stick with normal links and that no data connection is necessary.

    Hope that helps

    Paul

Maybe you are looking for

  • Impossible to uninstall

    Lately, I've been big problems with Firefox. I don't know if this is due to an upgrade or something else. Hard to describe, but I'll try it. I have to move the cursor to the top of the page to see the other tabs. The taskbar at the bottom is not visi

  • have not been able to complete the synchronization in a month

    I am running Firefox version 21.0 on Windows Vista. Here is what I get when trying to synchronize after about 5 tests: "This connection is Untrusted". You have asked Firefox to connect securely to the services.mozilla.com, but we cannot confirm that

  • Firefox crashed after attempting to clear the browser's cache and cookies, and now it crashes everytime I open.

    Update: I used the wrong word in the question. It FREEZES rather than be crushed. I have to force quit. Hope this clear things upward. I followed the instructions of an officer of Yahoo Mail (in a problem of yahoo with their mail) to clear the cache

  • 1402 ERROR CODE

    try to download quicken deluxe I received the error code 2011 1402 could not open key. I spent many hours with the help of quicken, they suggested finally got corrupted registry, so I'm here.  Thank you.

  • HowTo send the browser to the background (ApplicationMenuItem)

    I have the following scenario: Application screen A, x --> called a browser with the URL session where an image is displayed works well Request A, x screen adds an ApplicationMenuItem in the browser to make it easy to open some other URL with other i