Changeset 13291
- Timestamp:
- 2006-11-17T10:46:29+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl-documentation/tutorials/xml-source/tutorial_en.xml
r13265 r13291 1053 1053 </Format> 1054 1054 </NumberedItem> 1055 <Heading> 1056 <Text id="fw-24">Opening PDF files with query terms highlighted</Text> 1057 </Heading> 1058 <NumberedItem> 1059 <Text id="fw-24a">Next we'll customize the <AutoText text="SearchVList"/> format statement to highlight the query terms in a PDF file when it is opened from the search result list. This requires Acrobat Reader 7.0 version or higher, and only works on a windows platform.</Text> 1060 </NumberedItem> 1061 <NumberedItem> 1062 <Text id="fw-24c">The search terms are kept in the macro variable <AutoText text="_cgiargq_"/>, and we can append <AutoText text="#search="_cgiargq_""/> to the end of a PDF file link to pass the query terms to the PDF file.</Text> 1063 <Text id="fw-24d">By default, each PDF file is renamed as <AutoText text="doc.pdf"/> and saved in a unique hash directory when processed by <AutoText text="PDFPlug"/>, so we use</Text> 1064 <Format>_httpcollection_/index/assoc/[archivedir]/doc.pdf</Format> 1065 <Text id="fw-24e">to locate the PDF source file in a search result list.<br/>If you used the <AutoText text="-keep_original_filename"/> option of the <AutoText text="PDFPlug"/> to build the collection, then the original name of the PDF file is kept, and we use</Text> 1066 <Format>_httpcollection_/index/assoc/[archivedir]/[Source]</Format> 1067 <Text id="fw-24f">instead to locate a PDF source file.</Text> 1068 </NumberedItem> 1069 <NumberedItem> 1070 <Text id="fw-24g">Select <AutoText text="SearchVList"/> from the list of assigned formats. We first judge whether a file in the search result list is a PDF file, we can use</Text> 1071 <Format>[ex.FileFormat] eq 'PDF'</Format> 1072 <Text id="fw-24h">in an <Format>{If}</Format> statement to do this. Then we use the above format instead of the <AutoText text="[ex.srclink]"/> and <AutoText text="[ex./srclink]"/> variables just for the PDF files.</Text> 1073 <Text id="fw-24b">The resulting format statement looks like:</Text> 1074 <Format> 1075 <td valign="top">[link][icon][/link]</td><br/> 1076 <td valign="top"><highlight>{If}{[ex.FileFormat] eq 'PDF', <a 1077 href=\\"_httpcollection_/index/assoc/[archivedir]/doc.pdf#search=&quot;_cgiargq_&quot;\">[ex.srcicon]</a>,<br/>[ex.srclink][ex.srcicon][ex./srclink]}</highlight></td><br/> 1078 <td valign="top">[highlight]<br/> 1079 {Or}{[dc.Title],[ex.Title],Untitled}<br/> 1080 [/highlight]{If}{[ex.Source],<br><i>([ex.Source])</i>}</td><br/> 1081 </Format> 1082 <Text id="fw-24i">When the PDF icons are clicked in the search results, Acrobat will open the file with the search window opened, and the query terms highlighted.</Text> 1083 </NumberedItem> 1055 1084 </Content> 1056 1085 </Tutorial>
Note:
See TracChangeset
for help on using the changeset viewer.