-
1. Re: The preferred format of a data file for reading convenience
FrancisFukuyama Dec 18, 2010 6:24 PM (in response to FrancisFukuyama)Sorry, I did not clarify that this is input data file to be read into acrobat and generated by an external application in which I am adept but not in acrobat for reading and want to make my life in acrobat world easy while the generating application is an easy world for me.
Francis
-
2. Re: The preferred format of a data file for reading convenience
GKaiseril Dec 18, 2010 7:53 PM (in response to FrancisFukuyama)If you design the form in Acrobat, then you can use FDF file format or a tab delimited text file. More information is contained in the Acrobat JS API Reference.
Adobe has disabled ADBC in Acrobat forms, but LiveCycle Designer forms can establish a data connection to an SQL database.
-
3. Re: The preferred format of a data file for reading convenience
FrancisFukuyama Dec 18, 2010 11:59 PM (in response to GKaiseril)For simplicity, and proof of concept, I started with text file with tab delimitations and was able to read one of the columns of the first row into a text field that I made, however, that is clumsy for me since I want to read it into a variable and would be cleaner if I dont have to make a text field.
Can you or any kind soul here please explain me how to achieve this objective, ie read the rows of text file into variables.
Gratefully,
Francis Fukuyama
-
4. Re: The preferred format of a data file for reading convenience
dying veteran Dec 19, 2010 12:02 AM (in response to FrancisFukuyama)console.println( this.getField("identifier").value )
will give you the value and its POC but I dont know how you can do this without making a field somewhere ... maybe hidden ............
-
5. Re: The preferred format of a data file for reading convenience
FrancisFukuyama Dec 19, 2010 2:24 PM (in response to dying veteran)thanks. your answer was prompt and helpful but I still need a method to fill a variable by the value of tab delimited strings on a row and without making and cluttering my pdf doc with text fields.
I need a solution for this please.
Francis
-
6. Re: The preferred format of a data file for reading convenience
try67 Dec 19, 2010 2:33 PM (in response to FrancisFukuyama)If you use the Data object and the methods related to it, you won't need any
text fields. You could import the file and read its contents directly into a
variable.
-
7. Re: The preferred format of a data file for reading convenience
FrancisFukuyama Dec 19, 2010 3:37 PM (in response to try67)If you use the Data object and the methods related to it, you won't need any
text fields. You could import the file and read its contents directly into a
variable.
I dont dispute your expertise. Only that I tried this before asking and it gave an "undefined" sort of error. Then I created a text field and it worked. In between, I tried all sorts of things to see if there was some syntax or other error on my part.
The best way for you to steer me in the right direction is by a minimal example that I can enact out.
Gratefully,
Francis Fukuyama
some more info.
i converted the stream to string.
and it displays as a table, ie one big string with CRLF etc in it.
what to do next ?
-
8. Re: The preferred format of a data file for reading convenience
dying veteran Dec 23, 2010 9:02 PM (in response to FrancisFukuyama)You can read an XML tagged data file and get values into a variable without any text fields. I have uploaded a data file and a pdf containing a button with a javascript and have sent you the download link by PM.
If it helps in any way, dont forget to give me a few
[signature deleted by host]
-
9. Re: The preferred format of a data file for reading convenience
FrancisFukuyama Dec 19, 2010 5:58 PM (in response to dying veteran)Thanks. Your file worked and methodically laid out script. However every row was tagged and the label is repeated in every row. This is enormously verbose and wasteful for me. I prefer the tab separated fields as mentioned by GKaiseril and therefore I noted your reply as helpful but my original question of utilizing the tab separated file has yet to be answered as try67 says it can.
What is an FDF format and how efficient is it ? Is it binary and what compression or encoding systeme ?
Francis Fukuyama
-
10. Re: The preferred format of a data file for reading convenience
maxwyss Dec 19, 2010 9:51 PM (in response to FrancisFukuyama)FDF is the data format closest to PDF (as it is defined in the PDF standard). It follows the PDF syntax, and is plain text (although when you transfer it, it must be treated binary). When exported from a PDF, it may have compressed streams, but you always can create it as plain text. In any case, it is worthwile to have a look at the FDF section in the PDF specification.
HTH.
-
11. Re: The preferred format of a data file for reading convenience
FrancisFukuyama Dec 19, 2010 11:20 PM (in response to try67)If you use the Data object and the methods related to it, you won't need any
text fields. You could import the file and read its contents directly into a
variable.
==========================
So what method do I use for tab separated data file ?
code snippet ?




