<< 点击显示目录 >> 主页 mappView帮助助手 > mapp View帮助信息 > Widgets > Media > PDFViewer > Concept |
This section contains additional information about the concept of widget "PDFViewer".
The path to the PDF document to be displayed is defined using property src. Example: "Media/Docs/UserManual_EN.pdf".
The path is bindable via property src; it is also possible to specify a text key from the text system to show language-dependent PDF documents, for example.
If different documents should be displayed at runtime using property "src", note the following:
The default value of property "src" is not permitted to be defined until the user is on the page with the PDFViewer and the contents have been loaded. For example, client system event ContentLoaded can be used to assign property "src".
If the user navigates to another page or loads another piece of content so that the PDFViewer is no longer visible, the value of property "src" must be deleted. This ensures that the document is not damaged during fast navigation between pages.
There are 2 ways to use widget "PDFViewer".
The first way is to use the PDF viewer integrated in the browser to display the document ("usePlugin" = false).
If "usePlugin" = true, a JavaScript plug-in is used to display the document.
The plug-in is always available and is particularly valuable if no PDF viewer is available in the browser. The internal PDF viewer generally provides better performance and display quality, however.
Different properties are used to interact with the PDF. One of these is property "documentZoom", which is used for zooming in the PDF. Not all properties can be used with both PDFViewer methods. The following conditions apply:
Description |
usePlugin = true (use JavaScript plug-in) |
usePlugin = false (The internal PDF viewer in the Chrome browser is used.) |
|
Defines the number of the page whose contents should be initially displayed. |
|||
Configures the destination within a PDF document. It is possible to specify a jump to a certain page, for example. |
|||
Defines the zoom level and scroll factors for the displayed document. Values should be specified in the following format: zoom level, left, top. |
|||
Defines whether the PDF toolbar is displayed. |
It is also possible to append parameters to the path for interaction. The following variants are possible:
Example |
Description |
usePlugin = true (use JavaScript plug-in) |
usePlugin = false (use PDF viewer in browser) |
|
Media/Docs/brauer.pdf#page=6 |
|
|||
Media/Docs/brauer.pdf#nameddest=074B |
|
|||
Media/Docs/brauer.pdf#zoom=200 |
|
|||
Media/Docs/brauer.pdf#toolbar=1 |
|
|||
Media/Docs/brauer.pdf#page=5&zoom=150 |
|
The names of the parameter do not correspond exactly to the names of the widget properties.
Parameters that are appended to the path specification replace the values configured in the widget properties.