Class CmsJspTagPdfThumbnail

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.opencms.jsp.CmsJspTagPdfThumbnail
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class CmsJspTagPdfThumbnail extends javax.servlet.jsp.tagext.TagSupport
JSP tag to generate a link to a PDF produced from a given XML content.

See Also:
  • Field Summary

    Fields inherited from class javax.servlet.jsp.tagext.TagSupport

    id, pageContext

    Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface javax.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    static String
    pdfTagAction(javax.servlet.ServletRequest request, String file, int width, int height, String format)
    The implementation of the tag.
    void
    Sets the path to the PDF.
    void
    setFormat(String format)
    Setter for the format path.
    void
    setHeight(String height)
    Sets the height.
    void
    Sets the width.

    Methods inherited from class javax.servlet.jsp.tagext.TagSupport

    doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • pdfTagAction

      public static String pdfTagAction(javax.servlet.ServletRequest request, String file, int width, int height, String format) throws CmsException
      The implementation of the tag.

      Parameters:
      request - the current request
      file - the path to the PDF
      width - the thumbnail width
      height - the thumbnail height
      format - the image format
      Returns:
      the link to the PDF thumbnail
      Throws:
      CmsException - if something goes wrong
    • doStartTag

      public int doStartTag()
      Specified by:
      doStartTag in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class javax.servlet.jsp.tagext.TagSupport
      See Also:
      • Tag.doStartTag()
    • setFile

      public void setFile(String file)
      Sets the path to the PDF.

      Parameters:
      file - the PDF path
    • setFormat

      public void setFormat(String format)
      Setter for the format path.

      Parameters:
      format - the format path
    • setHeight

      public void setHeight(String height)
      Sets the height.

      Parameters:
      height - the height to set
    • setWidth

      public void setWidth(String width)
      Sets the width.

      Parameters:
      width - the width to set