Package com.xwiki.pdfviewer.macro
Class PDFViewerMacroParameters
java.lang.Object
com.xwiki.pdfviewer.macro.PDFViewerMacroParameters
Parameters for PDF Viewer Macro.
- Since:
- 2.3
- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFile()intgetWidth()voidsetAsAuthor(String asAuthor) Set whether to access the PDF file on behalf of the last author of the page calling the PDF Viewer macro (using their access rights) rather than on behalf of the current user (using the access rights of the current user).voidsetDocument(String document) Set the reference of the document that contains the PDF files to be viewed.voidSet the value of one or multiple files.voidsetFileFromExternalUrl(String fileFromExternalUrl) Set one or multiple PDF files from external URLs.voidsetHeight(int height) Set the display height of the PDF file.voidSet the display width of the PDF file.
-
Constructor Details
-
PDFViewerMacroParameters
public PDFViewerMacroParameters()
-
-
Method Details
-
getFile
- Returns:
- one or a list of PDF files
-
setFile
Set the value of one or multiple files. One file is represented by using a full attachment reference, an absolute URL or simply the file name.- Parameters:
file- one or a list of PDF files
-
getFileFromExternalUrl
- Returns:
- one or a comma-separated list of PDF files from external URLs
- Since:
- 2.6.3
-
setFileFromExternalUrl
Set one or multiple PDF files from external URLs.- Parameters:
fileFromExternalUrl- a single URL or a comma-separated list of URLs- Since:
- 2.6.3
-
getWidth
- Returns:
- the display width of the PDF file
-
setWidth
Set the display width of the PDF file.- Parameters:
width- display width of the PDF file
-
getHeight
public int getHeight()- Returns:
- the display height of the PDF file
-
setHeight
public void setHeight(int height) Set the display height of the PDF file.- Parameters:
height- display height of the PDF file
-
getDocument
- Returns:
- the reference of the document that contains the PDF files to be viewed
-
setDocument
Set the reference of the document that contains the PDF files to be viewed.- Parameters:
document- reference of the document that contains the PDF files
-
getAsAuthor
- Returns:
- whether to access the PDF file on behalf of the last author of the page calling the PDF Viewer macro (using their access rights) rather than on behalf of the current user (using the access rights of the current user)
-
setAsAuthor
Set whether to access the PDF file on behalf of the last author of the page calling the PDF Viewer macro (using their access rights) rather than on behalf of the current user (using the access rights of the current user).- Parameters:
asAuthor- true (or 1 or yes) if the view right of the PDF file document should be delegated to the users that requests to see it through the macro, false (or 0 or no) otherwise
-