How to Read a External File in a livecycle form (using javascript)

Hi Everyone,
   First of all, i would like to thank you in advanced for your help !!
   I have a situation were i need to load some values into some fields inside a dinamic pdf that was created in livecycle, what can i do so far ?
   I can load the fields with some values using a livecycle event and javascript, the values come from some functions that i have created but ... are fixed of course...
What i need is to load up the values from the outside world.... from a external file (text or xml) or a webservice... i have some several experiences but nothing has worked so far...
Can anyone publish a sample code in javascript to load up a file (text or xml) that works inside livecycle ??
Thanks in advanced.
Miguel Angelo (migas)

Hi, Paul,
  Thanks i have looked inside the link (dam big ) but i'm still kind of lost, can anyone please publish a code example ?
Miguel

Similar Messages

  • How to read an html file and replace a text using text_io

    hi,
    i want ro read an html file using text_io and replace a particular text with a new text
    eg: i want to replace a text called "data.js" and with "maps.js"
    how do i do this?

    You have to write your own code to do that. TEXT_IO is just a low level text file interface.
    You need to read in all the text, save it in some internal format (array of varchar2's maybe or in the DB) and then perform a search on the text you have read in, find out where the instances of "data.js" are located and substitute them with "maps.js" After that you need to write to a new file and delete the old one. There is no way to search and replace inside the existing file (what's sometimes referred to as 'in-place' substitution).
    See the help section called About the TEXT_IO package for an overview of how it works and some code examples.

  • How to read an excel file which contains multiple tabs using File adapter

    Hi BPEL gurus,
    I have a requirement where i need to read an EXCEL file, which has three tabs inside the file. All the three tabs has data in it. I have seen few examples where file adapter reads an excel file with data present inside a single tab but not with multiple tabs.
    If anyone has worked on this scenario, please provide your suggestions/inputs/links etc.
    Thanks in advance

    hi Sathish,
    this might help
    PI/XI: Reading MS Excel's XLSX and XLSM files with standard PI modules - easily...
    thanks and regards,
    Praveen T

  • How to merge static pdf files and dynamic livecycle forms

    Hello,
    I was wondering if there was a way to merge static pdf pages with a dynamic livecycle form to create one file.
    Thanks,
    -vargs

    Hi, Steve.
    I have a similar situation. I would like to combine static PDF documents with some forms created using LiveCycle Designer. I read your previous post and I am aware that I can combine them using Acrobat Pro.
    My question concerns accessibility.
    If I combine a static PDF document and a dynamic form created with LiveCycle, would the resulting PDF still be accessible enough for JAWS to read it properly?
    Any help appreciated.
    Wayne

  • Multiple recipient livecycle form using javascript in it to attach a pdf, external recipients get MIME formatted email.

    The livecycle designed form has javascript to send the form to 4 recipients.  The form worked fine until the mail domain was hosted by gmail (uses TLS, port 587).  Now recipients get a MIME email, not the attached PDF.  Old versions of the form pre-sept 29 work fine.  If we change the form or copy it, it does not work.  If we use a different smtp server to test, it works fine, all 4 recipients get the pdf.  Any advice is much appreciated!  I'd say gmail is the problem, but then why do old forms work fine still through gmail?
    the setup is Adobe Livecycle Designer ES4, Adobe Acrobat XI, Outlook 2007, gmail hosted company domain (ex. yourdomain.com), using SMTP port 587 TLS, javascript in the email to declare a PDF, and a button to run the javascript (not a submit button, the javascript does the submit action).
    problem looks like this:
    EARLY WORKS - PHASE 5, PILING - Change Order 888 
    Date: Fri, 9 Jan 2015 13:08:55 -0600 
    Message-ID: <002e01d02c3f$b802fdf0$2808f9d0$@ca> 
    MIME-Version: 1.0 
    Content-Type: multipart/mixed; 
                    boundary="----=_NextPart_000_002F_01D02C0D.6D688DF0"
    X-Mailer: Microsoft Office Outlook 12.0 
    Thread-Index: AdAsP5IQYfLzQOmBQKGrI/ckRv3akg==
    Content-Language: en-ca
    This is a multi-part message in MIME format.
    ------=_NextPart_000_002F_01D02C0D.6D688DF0
    Content-Type: text/plain;
         charset="us-ascii"
    Content-Transfer-Encoding: 7bit
    The contract has been adjusted by Change Order attached. Please retain copy
    for your file records. No hardcopy will be issued by mail.
    ------=_NextPart_000_002F_01D02C0D.6D688DF0
    Content-Type: application/pdf;
                     name="2785-5 Change Order TEST-Jeff-888.pdf"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment;
                      filename="2785-5 Change Order TEST-Jeff-888.pdf"
    JVBERi0xLjcNJeLjz9MNCjI1NiAwIG9iag08PC9MaW5lYXJpemVkIDEvTCAxMDc2MTkyL08gMjYx
      L0UgMTA1MjQ1Ni9OIDEvVCAxMDc1ODI1L0ggWyA3MTQgMzI5XT4   etc... 

    First of all, a drop-down menu doesn't allow for multiple item selection. You'll need a list-box field for that.
    Once you have that set up you can use the value(s) selected in this field as the recipients of the email.

  • How to seperate current page fields in a pdf form using javascript

    Hi,
    Is that possible to seperate current page fields(textbox, Chesckbox) in a pdf form using javascript.
    I have coding to get all the fields in a pdf form. But i want to take CURRENT PAGE alone.
    Please help me out.
    Thanks and regards,
    Christy

    Hi try67,
    Thanks for your support.
    I got the result.
    Thanks and Regards,
    Christy

  • How to release and read another external file

    My vi is set to read an external file (a previously collected force plate signal), then perform a string of analyses on it and finally save the analytical output. Currently, "Read from measurement file" is outside the while loop containing all of my analysis.
    Without completely restarting the vi, I would like to be able to release the file and load another.  How might I do this?  
    Thanks!

    I would do several things to clean up the block diagram.
    whenever you have multiple outputs that are related to each other (PF, F100, F150, F200, F250, etc...) or all of the RFDs and Impulses, you can bundle them together and then display them with one big cluster, or as an array, if that makes sense.  This will reduce your total number of outputs and maybe improve organizaiton.
    If you have a seqeunce of functions that go together, you can combine them into a SubVI to save blockdiagram space and making things more logical.
    If you have several places where the same sort of function is being done, (for example, you have Extract-Statistics-Formula several times and Extract-Integral-Statisics several times) you can make this into a sub-VI and then loop through it.  That way you can execute the function multiple times (with slight changes on each loop), but you only have to have the code written once. It also makes it much easier to improve the code because you only have to make one change instead of four. 
    The attached VI shows two ways of doing something.  On the left is your code, which is four sets of the same thing.  On the right, I've taken this code and put it into a loop so it does the same thing four times.
    Attachments:
    Simplified Code.vi ‏896 KB

  • How to execute an external file in java ?

    How to execute an external file , where the file name of the external file is in unicode character. (i,e, may be in Chinese character).

    Process p = Runtime.getRuntime().exec("/path/to/executable");
    This is write. But my question is while the file name is in Chinese font.
    It means while a file name is in Chinese font or any unicode character that are supported by window but not in the command prompt. In this case the file name is changed to ??????.doc like.
    So, while trying to execute this it shows File not found message.

  • How to open an external file in Labview?

    Hi, Who knows how to open an external file in LabView? I want to open an .UDL file(data link API) which is a dialog window letting me input correlated database information, but I dont know how to open this type of file in my LabView Program.
    Thanks.
    Red

    A UDL is technically a text file, so you could open it with "Read Characters from file", put the result string into a string control, edit it and save it back using the "Write Characters to File".
    UDLs however have their own configuration dialog embedded in the Windows OS. You can use this dialog in your LabVIEW application. The attached VI shows how to create a new UDL. You can edit an existing UDL by switching the method node to PromptEdit and wiring in an open ADO connection reference.
    Attachments:
    ConfigureDatabaseConnection.vi ‏26 KB

  • How can one  read a Excel File and Upload into Table using Pl/SQL Code.

    How can one read a Excel File and Upload into Table using Pl/SQL Code.
    1. Excel File is on My PC.
    2. And I want to write a Stored Procedure or Package to do that.
    3. DataBase is on Other Server. Client-Server Environment.
    4. I am Using Toad or PlSql developer tool.

    If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
    1. Get your DBA to create directory object in oracle using the following command:
    create directory TEST_DIR as ‘directory_path’;
    Note: This directory is on the server.
    2. Grant read,write on directory directory_object_name to username;
    You can find out the directory_object_name value from dba_directories view if you are using the system user account.
    3. Logon as the user as mentioned above.
    Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
    function getData(p_filename in varchar2,
    p_filepath in varchar2
    ) RETURN VARCHAR2 is
    input_file utl_file.file_type;
    --declare a buffer to read text data
    input_buffer varchar2(4000);
    begin
    --using the UTL_FILE in built package
    input_file := utl_file.fopen(p_filepath, p_filename, 'R');
    utl_file.get_line(input_file, input_buffer);
    --debug
    --dbms_output.put_line(input_buffer);
    utl_file.fclose(input_file);
    --return data
    return input_buffer;
    end;
    Hope this helps.

  • How to read several text files at a time

    Dear all
          Read and write one text file is not a problem, but  what confusies me is how to read several text files at one time, in the meanwhile,
    is it possible to display the name of the text file?
    For example, assuming I want to load file" cha 1, cha 2 , cha 3, " at one time and show their names, how to hadle with it
    I have reviewed some files and it is not helpful

    Either with a 'for' loop like in the lib you have attached, or like this attached VI
    that's it
    Message Edited by devchander on 05-30-2006 05:11 AM
    Attachments:
    MULTIPLE READ.vi ‏44 KB

  • How to read multiple dat files.

    Hello Everyone!
    I am working on a project that requires one file that creates a JFrame with a current file title, JTextFields that accesses two .dat files and a JButton.
    The user clicks a JButton to cycle through the first sequential .dat file. When the end of the first file is reached the file is closed, the JFrame title is changed to the second file title as the user continues to click the JButton to continue on viewing the second file?s records, until the second reaches the end of file.
    The project requires using Try-Catches to catch the EOF exceptions and IOExceptions and Thread or Runnable.
    I have been able to get one file to read and display its records; however, researching back through my text on how to read/write to files I haven?t been able to determine how to get to the end of the file and proceed to the next file without triggering the EOFException. I have even tried multiple Try-Catches (one for each file within the actionPerformed method) and that ends up ignoring the first file records and only displays the second files records.
    This is a school project and we have only covered just the bare basics of Java over the last two months. So, any hints that anyone can provide can only be of what type of procedure will be needed or what procedure won?t help to complete the task, without giving away the solution.
    I have spent approximately 40 hours of study time on this project and believe that I have definitely run into a major snag.
    The following is the code I have so far:
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class StudentRead extends JFrame implements ActionListener
       private JLabel gradStudentList = new JLabel("GRADUATE Student List");
       private JLabel undergradStudentList = new JLabel("UNDERGRADUATE Student List"); 
       private Font bigFont = new Font("Helvetica", Font.ITALIC, 24);
       private JLabel userprompt = new JLabel("View the students");
       private JTextField idNumText = new JTextField(4); 
       private JTextField lastNameText = new JTextField(15);
       private JTextField firstNameText = new JTextField(15);
       private JButton viewRecordButton = new JButton("View Record");
       private JLabel idNumberLabel = new JLabel("ID Number"); 
       private JLabel lastNameLabel = new JLabel("Last name"); 
       private JLabel firstNameLabel = new JLabel("First name");
       private Container con = getContentPane();
       DataInputStream gradStudentInStream;
       DataInputStream undergradStudentInStream;
       public StudentRead()
          super("Read Student Records");
          try
             gradStudentInStream = new DataInputStream(new FileInputStream("GradStudents.dat"));
             undergradStudentInStream = new DataInputStream(new FileInputStream("UndergradStudents.dat"));
          catch(IOException e)
             System.err.println("File not opened");
             System.exit(1);
          setSize(325, 200);
          con.setLayout(new FlowLayout());
          gradStudentList.setFont(bigFont);
          con.add(gradStudentList);
          con.add(userprompt);
          con.add(idNumberLabel);
          con.add(idNumText);
          con.add(lastNameLabel);
          con.add(lastNameText);
          con.add(firstNameLabel);
          con.add(firstNameText);
          con.add(viewRecordButton);
          viewRecordButton.addActionListener(this);
          setVisible(true);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       public void actionPerformed(ActionEvent e1)
          String lastName, firstName;     
          int IdNum;
          try
             IdNum = gradStudentInStream.readInt();      
             lastName = gradStudentInStream.readUTF();
             firstName = gradStudentInStream.readUTF();
             idNumText.setText(String.valueOf(IdNum));
             lastNameText.setText(lastName);
             firstNameText.setText(firstName);
          catch(EOFException e2)
             closeFile();
             System.exit(0);
          catch(IOException e3)
             System.err.println("Error reading file");
             System.out.println("out");      
             System.exit(1);
       public void closeFile()
          try
             gradStudentInStream.close();
             System.exit(0);
          catch(IOException e)
             System.err.println("Error closing file");
             System.exit(1);
       public static void main(String[] args)
          StudentRead rsr = new StudentRead();
    }

    deepak_1your.com wrote:
    hi,
    If you want to read a file guarding yourself agianst exceptions....
    check this article.... the code presented in this article might suit your needs...
    [http://1your.com/fusion/infusions/articles/readarticle.php?article_id=17|http://1your.com/fusion/infusions/articles/readarticle.php?article_id=17]
    And how does that help with a DataInputStream?

  • How to read an xml file from headers

    Hi ,
    I am not getting how to read an xml file sent by client device in header to server.
    Thankx.

    There is a getHeader() in HttpServletRequest interface
    String locationURL=request.getHeader("Location");If URL of your file was set in Location attribute of header.
    Edited by: ngpgeeta on Dec 19, 2008 8:03 AM

  • How to read a text file using Java

    Guys,
    Good day!
    Please help me how to read a text file using Java and create/convert that text file into XML.
    Thanks and God Bless.
    Regards,
    I-Talk

         public void fileRead(){
                 File aFile =new File("myFile.txt");
             BufferedReader input = null;
             try {
               input = new BufferedReader( new FileReader(aFile) );
               String line = null;
               while (( line = input.readLine()) != null){
             catch (FileNotFoundException ex) {
               ex.printStackTrace();
             catch (IOException ex){
               ex.printStackTrace();
         }This code is to read a text file. But there is no such thing that will convert your text file to xml file. You have to have a defined XML format. Then you can read your data from text files and insert them inside your xml text. Or you may like to read xml tags from text files and insert your own data. The file format of .txt and .xml is far too different.
    cheers
    Mohammed Jubaer Arif.

  • How to Read a CAB File from JAVA?

    Hi,
    Anyone knows how to read a CAB File from java. I need to read a property file of txt file that is packaged in CAB file & then based on that, I have to do processing. Is there anyway to do it.
    I had tried using java.util.zip.ZipFile Class, but it does work for JAR, but not for CAB.
    siva.

    Perhaps there's something in the Cabinet SDK that will help:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncabsdk/html/cabdl.asp

Maybe you are looking for