Difference between revisions of "DocumentView Options"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 84: | Line 84: | ||
[[Category:Attribute Categories]] | [[Category:Attribute Categories]] | ||
[[Category:Lianja v2.0]] | [[Category:Lianja v2.0]] | ||
+ | [[Category:Sections]] |
Revision as of 09:30, 28 July 2016
Contents
See Also
DocumentView Section Attributes, Using Attachment Sections for document/image storage and retrieval
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 | - |