Applescript - Extract data from fdf file
I'm a newbie in AppleScript. I tried to read fdf file and find the comments in the file.
FDF File
%FDF-1.2
%‚„œ”
1 0 obj
<</FDF<</Annots[2 0 R 3 0 R 4 0 R 5 0 R 6 0 R 7 0 R 8 0 R 9 0 R]/F(/Untitled 1_2/Users/gmuniandy/Desktop/stylecheck/BoldTest2 2.pdf)/ID[<3D0C838BAEE04E3CB82F7182A96AF453><786E2F2D97524ECFB3BDA2BA97E84FF0>]/UF(/Untitled 1_2/Users/gmuniandy/Desktop/stylecheck/BoldTest2 2.pdf)>>/Type/Catalog>>
endobj
2 0 obj
<</C[1.0 0.0 0.0]/Contents(Change this to Hi World)/CreationDate(D:20140120160021+08'00')/F 4/M(D:20140120160044+08'00')/NM(5975f48e-1e02-4e43-b94d-bd07af2a8573)/Page 0/Popup 3 0 R/RC(<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acrobat:9.0.0" xfa:spec="2.0.2" ><p dir="ltr"><span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;font-we\
ight:normal;font-style:normal">Change this to Hi World</span></p></body>)/RD[0.5 0.5 0.5 0.5]/Rect[146.562 777.358 300.252 814.244]/Subj(Rectangle)/Subtype/Square/T(gmuniandy)/Type/Annot>>
endobj
3 0 obj
<</F 28/Open false/Page 0/Parent 2 0 R/Rect[595.28 693.744 775.28 813.744]/Subtype/Popup/Type/Annot>>
endobj
4 0 obj
<</C[1.0 0.0 0.0]/Contents(stroke to strike)/CreationDate(D:20140120160117+08'00')/F 4/M(D:20140120160133+08'00')/NM(a2855894-82c2-b142-b765-2a8ae52e1b14)/Page 0/Popup 5 0 R/RC(<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acrobat:9.0.0" xfa:spec="2.0.2" ><p dir="ltr"><span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;font-we\
ight:normal;font-style:normal">stroke to strike</span></p></body>)/RD[0.5 0.5 0.5 0.5]/Rect[296.438 591.596 376.246 626.371]/Subj(Rectangle)/Subtype/Square/T(gmuniandy)/Type/Annot>>
endobj
5 0 obj
<</F 28/Open false/Page 0/Parent 4 0 R/Rect[595.28 505.871 775.28 625.871]/Subtype/Popup/Type/Annot>>
endobj
6 0 obj
<</C[1.0 0.0 0.0]/Contents(bold it)/CreationDate(D:20140120160106+08'00')/F 4/M(D:20140120160111+08'00')/NM(59711a0e-4d5f-0a47-ad6a-ec88f848d577)/Page 0/Popup 7 0 R/RC(<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acrobat:9.0.0" xfa:spec="2.0.2" ><p dir="ltr"><span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;font-we\
ight:normal;font-style:normal">bold it</span></p></body>)/RD[0.5 0.5 0.5 0.5]/Rect[249.997 635.926 320.658 689.699]/Subj(Rectangle)/Subtype/Square/T(gmuniandy)/Type/Annot>>
endobj
7 0 obj
<</F 28/Open false/Page 0/Parent 6 0 R/Rect[595.28 569.199 775.28 689.199]/Subtype/Popup/Type/Annot>>
endobj
8 0 obj
<</C[1.0 0.0 0.0]/Contents(not bold)/CreationDate(D:20140120160051+08'00')/F 4/M(D:20140120160059+08'00')/NM(c8271566-7ca6-5c40-92b3-df3c7f926f19)/Page 0/Popup 9 0 R/RC(<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acrobat:9.0.0" xfa:spec="2.0.2" ><p dir="ltr"><span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;font-we\
ight:normal;font-style:normal">not bold</span></p></body>)/RD[0.5 0.5 0.5 0.5]/Rect[293.623 699.958 350.211 744.583]/Subj(Rectangle)/Subtype/Square/T(gmuniandy)/Type/Annot>>
endobj
9 0 obj
<</F 28/Open false/Page 0/Parent 8 0 R/Rect[595.28 624.083 775.28 744.083]/Subtype/Popup/Type/Annot>>
endobj
trailer
<</Root 1 0 R>>
%%EOF
I managed to read the file by doing this.
set the_file to choose file
set the_text to (do shell script "cat " & quoted form of (POSIX path of the_file))
set the clipboard to the_text
Is the anywhere i can extract only the highlighted value. The one in red color. Please advice.