I am attempting to populate fields that are generated through a static pdf, but that all contain the same type of data.
All of this data is selectable and can be copied out of the source, so I figured that it would be possible to pull it through a javascript command.
Currently when you view the pdf file in notepad this appears:
(Notes: ) Tj
/F14 10.56 Tf
1 0 0 1 228 668.64 Tm
-0.107 Tc 0.052 Tw (Jim's Taxi quote 123) Tj
1 0 0 1 22.08 702.24 Tm
-0.122 Tc 0.067 Tw (Jim Pinto) Tj
1 0 0 1 22.08 690.24 Tm
-0.071 Tc 0.017 Tw (Jim's Taxi.) Tj
1 0 0 1 22.08 678.24 Tm
-0.077 Tc 0.022 Tw (123 main st) Tj
1 0 0 1 22.08 666.24 Tm
-0.085 Tc 0.031 Tw (Houston) Tj
1 0 0 1 22.08 654.24 Tm
-0.103 Tc 0.048 Tw (TX) Tj
/F15 12 Tf
1 0 0 1 411.36 154.56 Tm
-0.091 Tc 0 Tw
I already have a button attaching the file to the document. I would also like for that button to read the values in the notes section of the pdf. Every item I need ALWAYS appears after the Tw and occurs in brackets; Tw (*) while the numbering changes.
So the command needs to read the file, find the (Notes: ) section, copy the first value (Jim's Taxi quopte 123) and enter it into a field, find the next value (Jim Pinto) and copy it into the name field etc. In this way, by simply selecting the file, regardless of the pdf's orgins and have it populate the data field predetermined (i.e the first field is ALWAYS the customers company name.)
Can anyone here provide a little insight on the way to go about doing this? I am getting a bit stuck.
Views
Replies
Total Likes