Difference between revisions of "DocumentView Options"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) (→Notes on Client Support) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | '' | + | |
+ | ==See Also== | ||
+ | [[ArticleView Options]], [[Attachments Options]], [[DocumentView Section Attributes]] | ||
+ | |||
+ | ==Overview== | ||
+ | |||
+ | [[{{ns:file}}:docview_web.png|450px|thumb|left|link={{filepath:docview_web.png}}|DocumentView Section in Lianja Web Client]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | DocumentView Sections are used to view pdf documents. | ||
+ | |||
+ | The DocumentView Section includes tools for printing, downloading, searching, zooming and navigating the document displayed without having to install any plugins. | ||
+ | <br clear=all> | ||
+ | |||
+ | ==Lianja DocumentView Demo== | ||
+ | [[{{ns:file}}:docview1.png|450px|thumb|left|link={{filepath:docview1.png}}|example_docview App]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | The 'Lianja DocumentView Demo' (example_docview) is included in the Lianja App Builder distribution to demonstrate the use of a DocumentView Section. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | [[{{ns:file}}:docview2.png|450px|thumb|left|link={{filepath:docview2.png}}|example_docview App]] | ||
+ | <br clear=all> | ||
+ | |||
+ | ==DocumentView Section options== | ||
+ | |||
+ | [[{{ns:file}}:docview_options.png|450px|thumb|left|link={{filepath:docview_options.png}}|DocumentView Section options]] | ||
+ | |||
+ | <br clear=all> | ||
+ | The following DocumentView Section section-specific options are available: | ||
+ | ===File=== | ||
+ | The '''File''' Attribute defines the pdf file to be displayed in the Section. In the example_docview App, the '''File''' Attribute is empty, because it uses the Desktop DocumentView Section's default pdf document, 'compressed.tracemonkey-pldi-09.pdf'. This pdf file is included in the example_docview App's directory. The Web Client DocumentView Section does not have a default pdf document, so the '''File''' Attribute should have a value set before deploying this App to the Web Client. | ||
+ | |||
+ | <pre>compressed.tracemonkey-pldi-09.pdf</pre> | ||
+ | |||
+ | The Web Client DocumentView Section can also display documents from the Library (\lianja\cloudserver\tenants\public\wwwroot\library): | ||
+ | |||
+ | <pre>library:/compressed.tracemonkey-pldi-09.pdf</pre> | ||
+ | or | ||
+ | <pre>lib:/compressed.tracemonkey-pldi-09.pdf</pre> | ||
+ | |||
+ | The '''File''' Attribute can contain '{}' macros, e.g. | ||
+ | |||
+ | <pre>{documents.document}</pre> | ||
+ | |||
+ | [[{{ns:file}}:docview_filemacro.png|450px|thumb|left|link={{filepath:docview_filemacro.png}}|File Attribute with macro]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Here we have a 'documents' table with a field called 'document' containing the name of a pdf file located in the App's directory. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | [[{{ns:file}}:docview_filemacroweb.png|450px|thumb|left|link={{filepath:docview_filemacroweb.png}}|File Attribute with macro, Web Client]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Navigating through the 'documents' table loads the pdf named in 'documents.document' into the DocumentView Section. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | The '''File''' Attribute is not directly accessible from scripting. DocumentView Sections are based on the 'documentview.rsp' Lianja Server Page script located in the Library. The 'documentview.rsp' script takes one parameter, the name of the pdf file to be displayed. To set the file from scripting, the Section '''url''' property should be used: reload library:/documentview.rsp and pass it the name of your file, then refresh the Section. e.g. | ||
+ | |||
+ | <pre>Lianja.get("page1.section1").url = "library:/documentview.rsp?file=compressed.tracemonkey-pldi-09.pdf"; | ||
+ | Lianja.get("page1.section1").refresh();</pre> | ||
+ | |||
+ | ==Notes on Client Support== | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width="20%"|Attribute | !width="20%"|Attribute | ||
− | !width="80%"| | + | !width="80%"|Notes |
|- | |- | ||
− | |valign="top"|File|| | + | |valign="top"|File||- |
|- | |- | ||
|} | |} | ||
[[Category:Attribute Categories]] | [[Category:Attribute Categories]] | ||
+ | [[Category:Lianja v2.0]] | ||
+ | [[Category:Sections]] | ||
+ | [[Category:WebView Based Sections]] |
Latest revision as of 10:15, 12 April 2024
Contents
See Also
ArticleView Options, Attachments Options, DocumentView Section Attributes
Overview
DocumentView Sections are used to view pdf documents.
The DocumentView Section includes tools for printing, downloading, searching, zooming and navigating the document displayed without having to install any plugins.
Lianja DocumentView Demo
The 'Lianja DocumentView Demo' (example_docview) is included in the Lianja App Builder distribution to demonstrate the use of a DocumentView Section.
DocumentView Section options
The following DocumentView Section section-specific options are available:
File
The File Attribute defines the pdf file to be displayed in the Section. In the example_docview App, the File Attribute is empty, because it uses the Desktop DocumentView Section's default pdf document, 'compressed.tracemonkey-pldi-09.pdf'. This pdf file is included in the example_docview App's directory. The Web Client DocumentView Section does not have a default pdf document, so the File Attribute should have a value set before deploying this App to the Web Client.
compressed.tracemonkey-pldi-09.pdf
The Web Client DocumentView Section can also display documents from the Library (\lianja\cloudserver\tenants\public\wwwroot\library):
library:/compressed.tracemonkey-pldi-09.pdf
or
lib:/compressed.tracemonkey-pldi-09.pdf
The File Attribute can contain '{}' macros, e.g.
{documents.document}
Here we have a 'documents' table with a field called 'document' containing the name of a pdf file located in the App's directory.
Navigating through the 'documents' table loads the pdf named in 'documents.document' into the DocumentView Section.
The File Attribute is not directly accessible from scripting. DocumentView Sections are based on the 'documentview.rsp' Lianja Server Page script located in the Library. The 'documentview.rsp' script takes one parameter, the name of the pdf file to be displayed. To set the file from scripting, the Section url property should be used: reload library:/documentview.rsp and pass it the name of your file, then refresh the Section. e.g.
Lianja.get("page1.section1").url = "library:/documentview.rsp?file=compressed.tracemonkey-pldi-09.pdf"; Lianja.get("page1.section1").refresh();
Notes on Client Support
Attribute | Notes |
---|---|
File | - |