Package com.saperion.ngc.viewer.pdfjs
Class PdfjsViewerUtil
java.lang.Object
com.saperion.ngc.viewer.pdfjs.PdfjsViewerUtil
- All Implemented Interfaces:
Serializable
Utility methods for
PdfjsViewerImpl
and pdfjsViewerWindow.jsp.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the options for the Adobe Plugin as set in the configuration file.Returns the way the current element must be displayed.getDisplayMode
(OpenDocumentBean bean, String name) Returns the way the current element must be displayed.boolean
boolean
boolean
void
Removes the 'targetFormat' parameter from the bean.void
Adds a parameter 'targetFormat' in the bean, which will cause theViewDocumentServlet
to render the element as PDF.
-
Field Details
-
USE_EMBED_PDF_MODE
- See Also:
-
-
Constructor Details
-
PdfjsViewerUtil
public PdfjsViewerUtil(jakarta.servlet.http.HttpServletRequest request)
-
-
Method Details
-
isImage
- Parameters:
filename
- filename of element to display- Returns:
- true if element is an image (jpg, gif, png)
-
isPdf
- Parameters:
filename
- filename of element to display- Returns:
- true if element is a pdf
-
isMp4
- Parameters:
filename
- filename of element to display- Returns:
- true if element is a mp4 video
-
canRender
- Parameters:
filename
- filename of element to display- Returns:
- true if the render engine can render this type of file
-
getDisplayMode
Returns the way the current element must be displayed. Additionally, if required an attribute named 'targetFormat' is added to the bean, which is read by theViewDocumentServlet
. If a target format is set, the servlet will render the element before delivering it.- Parameters:
bean
-OpenDocumentBean
of the viewer- Returns:
- the mode the document must be displayed
-
getAdobePluginOptions
Returns the options for the Adobe Plugin as set in the configuration file.- Returns:
- options for Adobe Plugin
-
getDisplayMode
Returns the way the current element must be displayed. Additionally, if required an attribute named 'targetFormat' is added to the bean, which is read by theViewDocumentServlet
. If a target format is set, the servlet will render the element before delivering it.- Parameters:
name
- the name of the file to get the display-mode forbean
-OpenDocumentBean
of the viewer- Returns:
- the mode the document must be displayed
-
getDisplayModeForTemporaryDocs
- Parameters:
name
- name of the temporary element to display- Returns:
- the mode the temporary document must be displayed
-
setRenderTargetInBean
Adds a parameter 'targetFormat' in the bean, which will cause theViewDocumentServlet
to render the element as PDF.- Parameters:
bean
-OpenDocumentBean
of the viewer
-
removeRenderTargetInBean
Removes the 'targetFormat' parameter from the bean.- Parameters:
bean
-OpenDocumentBean
of the viewer
-
getAdditionalParams
- Returns:
- Additional parameters for viewer.html URL.
-