From version 788.1
edited by Silvia Macovei
on 2020/09/04 11:29
To version 789.1
edited by Silvia Macovei
on 2020/09/04 11:31
Change comment: There is no comment for this version

Summary

Details

ExtensionCode.ExtensionClass[0]
Description
... ... @@ -1,67 +1,11 @@
1 -{{extensionToc/}}
1 +The PDF Pro Viewer Macro allows users to load and view PDF files inside a wiki page. The Viewer supports a double full screen mode:
2 +* first going full screen in your browser
3 +* then going full screen on your computer if your browser supports that mode.
2 2  
3 -The PDF Viewer Macro allows users to load and view PDF files inside a wiki page. The Viewer supports a double full screen mode: first going full screen in your browser and then going full screen on your computer if your browser supports that mode. The PDF location could be the current wiki page, another wiki page or an external URL.
5 +The PDF location could be the current wiki page, another wiki page or an external URL.
4 4  
5 -== Parameters ==
7 +image:PDFViewer.png
6 6  
7 -Below are described the parameters of the PDF Viewer Macro that need be used in order to define the way a PDF file is displayed in a wiki page.
8 8  
9 -|=Name|=Pretty name|=Mandatory?|=Default|=Description
10 -|asauthor|Delegate my view right|(x)|0|If this value is true (or 1 or yes) and the viewing user has no access to the document containing the PDF file, the PDF file could still be viewed on behalf of your view right (as long as you have view right on the containing document obviously).
11 -|document|Document|(x)|current document|Reference to the XWiki document to which the file is attached (e.g. **xwiki:Path.To.Document**). The **xwiki:** part can be ignored if the file is located in the current wiki). If file argument is an absolute URL, this argument is ignored.
12 -|file|File|(/)|//N/A//|Name or the absolute URL of the PDF file.
13 -|height|Height|(x)|1000|The viewer height, accepts values in pixels or in percentage.
14 -|width|Width|(x)|100%|The viewer width, accepts values in pixels or in percentage.
15 15  
16 -== Using the macro from WYSIWYG editor ==
17 -
18 -Edit a wiki page in WYSIWYG mode and look in the tool bar for the {{velocity}}$services.icon.render('cog'){{/velocity}} icon (XWiki Macro), search for **PDF Viewer Macro** and fill in the parameters values.
19 -
20 -{{gallery}}
21 - image:selectCog.png
22 - image:selectPdfViewerMacro.png
23 - image:pdfViewerProperties.png
24 -{{/gallery}}
25 -
26 -== Using the macro from wiki editor (code) ==
27 -
28 -=== PDF file attached to a wiki page ===
29 -
30 -To note that when using this option to display a PDF on a wiki page, the URL for the PDF will be generated using the XWiki API which can handle different setups for the wiki (path based, domain based, alias updates, etc).
31 -
32 -{{code}}
33 -{{pdfviewer file="gsoc.pdf" document="dev:GoogleSummerOfCode.WebHome" asauthor="1" height="900" width="80%"/}}
34 -{{/code}}
35 -
36 -=== PDF file attached to a terminal wiki page ===
37 -
38 -When having a PDF file attached to a terminal page, the syntax is slightly different, leaving out the "WebHome" mention.
39 -
40 -{{code}}
41 -{{pdfviewer file="gsoc.pdf" document="dev:GoogleSummerOfCode" asauthor="1" height="900" width="80%"/}}
42 -{{/code}}
43 -
44 -=== PDF accessed from an external resource via URL ===
45 -
46 -When using an absolut/explicit URL to display the PDF on a wiki page, keep in mind that you might need to update the URL if the alias of the source where the PDF is located will be changed.
47 -
48 -{{code}}
49 -{{pdfviewer file="http://dev.xwiki.org/xwiki/bin/download/GoogleSummerOfCode/gsoc.pdf" /}}
50 -{{/code}}
51 -
52 -{{image reference="viewPdf.png"/}}
53 -
54 -== Display multiple PDF files in the same page using a tab system layout ==
55 -
56 -Add more PDF files, separated by comma.
57 -
58 -{{code}}
59 -{{pdfviewer file="TLSanalysis.pdf,H-MSD2018.pdf"/}}
60 -{{/code}}
61 -
62 -{{image reference="editMacro.png"/}}
63 -
64 -{{image reference="multiplePdfFiles.png"/}}
65 -
66 -
67 67  
Store.Code.PayingAppsClass[0]
Documentation
... ... @@ -1,1 +1,64 @@
1 -
1 += Topics =
2 +
3 +{{toc start="2"/}}
4 +
5 +== Parameters ==
6 +
7 +Below are described the parameters of the PDF Viewer Macro that need be used in order to define the way a PDF file is displayed in a wiki page.
8 +
9 +|=Name|=Pretty name|=Mandatory?|=Default|=Description
10 +|asauthor|Delegate my view right|(x)|0|If this value is true (or 1 or yes) and the viewing user has no access to the document containing the PDF file, the PDF file could still be viewed on behalf of your view right (as long as you have view right on the containing document obviously).
11 +|document|Document|(x)|current document|Reference to the XWiki document to which the file is attached (e.g. **xwiki:Path.To.Document**). The **xwiki:** part can be ignored if the file is located in the current wiki). If file argument is an absolute URL, this argument is ignored.
12 +|file|File|(/)|//N/A//|Name or the absolute URL of the PDF file.
13 +|height|Height|(x)|1000|The viewer height, accepts values in pixels or in percentage.
14 +|width|Width|(x)|100%|The viewer width, accepts values in pixels or in percentage.
15 +
16 +== Using the macro from WYSIWYG editor ==
17 +
18 +Edit a wiki page in WYSIWYG mode and look in the tool bar for the {{velocity}}$services.icon.render('cog'){{/velocity}} icon (XWiki Macro), search for **PDF Viewer Macro** and fill in the parameters values.
19 +
20 +{{gallery}}
21 + image:selectCog.png
22 + image:selectPdfViewerMacro.png
23 + image:pdfViewerProperties.png
24 +{{/gallery}}
25 +
26 +== Using the macro from wiki editor (code) ==
27 +
28 +=== PDF file attached to a wiki page ===
29 +
30 +To note that when using this option to display a PDF on a wiki page, the URL for the PDF will be generated using the XWiki API which can handle different setups for the wiki (path based, domain based, alias updates, etc).
31 +
32 +{{code}}
33 +{{pdfviewer file="gsoc.pdf" document="dev:GoogleSummerOfCode.WebHome" asauthor="1" height="900" width="80%"/}}
34 +{{/code}}
35 +
36 +=== PDF file attached to a terminal wiki page ===
37 +
38 +When having a PDF file attached to a terminal page, the syntax is slightly different, leaving out the "WebHome" mention.
39 +
40 +{{code}}
41 +{{pdfviewer file="gsoc.pdf" document="dev:GoogleSummerOfCode" asauthor="1" height="900" width="80%"/}}
42 +{{/code}}
43 +
44 +=== PDF accessed from an external resource via URL ===
45 +
46 +When using an absolut/explicit URL to display the PDF on a wiki page, keep in mind that you might need to update the URL if the alias of the source where the PDF is located will be changed.
47 +
48 +{{code}}
49 +{{pdfviewer file="http://dev.xwiki.org/xwiki/bin/download/GoogleSummerOfCode/gsoc.pdf" /}}
50 +{{/code}}
51 +
52 +{{image reference="viewPdf.png"/}}
53 +
54 +== Display multiple PDF files in the same page using a tab system layout ==
55 +
56 +Add more PDF files, separated by comma.
57 +
58 +{{code}}
59 +{{pdfviewer file="TLSanalysis.pdf,H-MSD2018.pdf"/}}
60 +{{/code}}
61 +
62 +{{image reference="editMacro.png"/}}
63 +
64 +{{image reference="multiplePdfFiles.png"/}}
XWiki SAS Copyright © 2019