Class FormViewerOptions

java.lang.Object
org.jpedal.render.output.OutputModeOptions
org.jpedal.render.output.FormViewerOptions

public class FormViewerOptions extends OutputModeOptions
The class to use for setting output options when using FormVu.
  • Constructor Details

    • FormViewerOptions

      public FormViewerOptions(Map<String,String> jvmOptions)
    • FormViewerOptions

      public FormViewerOptions()
  • Method Details

    • setSubmitUrl

      public void setSubmitUrl(String value)
      Set the default pdf form submission URL

      Please Note: once the user click submit button the filled pdf form will be posted to server as base64 String with the parameter name "pdfdata"

      Possible values:

      • https://form.submission.com/

      Default: none

      Also set with -Dorg.jpedal.pdf2html.submitUrl=

      Parameters:
      value - is of type String.
    • setInlineJavaScriptAndCSS

      public void setInlineJavaScriptAndCSS(boolean value)
      Inline JavaScript and CSS within HTML.

      This inlines the JavaScript into <\script> tags and CSS into <\style> within HTML so that there are no separate .js/.css files.

      Possible values:

      • true/false

      Default: false

      Also set with -Dorg.jpedal.pdf2html.inlineJavaScriptAndCSS=

      Parameters:
      value - Boolean true/false
    • setEnableFDFJavaScript

      @Deprecated public void setEnableFDFJavaScript(boolean value)
      Deprecated.
      Function has been renamed to setEnableAcroFormJS, this method will be removed in a future release
      Parameters:
      value - Boolean true/false
    • setEnableAcroFormJS

      public void setEnableAcroFormJS(boolean value)
      Enable JavaScript from the AcroForm PDF to be included in the conversion output.

      JavaScript functionality must already be present in the PDF.

      Possible values:

      • true/false

      Default: false

      Also set with -Dorg.jpedal.pdf2html.enableAcroFormJS=

      Parameters:
      value - Boolean true/false
    • setNoCheckboxOrRadioButtonImages

      public void setNoCheckboxOrRadioButtonImages(boolean value)
      Do not use the on/off images from the converted PDF for checkboxes/radio buttons.

      Uses the HTML <input> implementations instead.

      Possible values:

      • true/false

      Default: false

      Also set with -Dorg.jpedal.pdf2html.noCheckboxOrRadioButtonImages=

      Parameters:
      value - Boolean true/false
    • setOutputContentMode

      public void setOutputContentMode(FormViewerOptions.OutputContentMode outputContentMode)
      The output content mode affects what content is included in the generated output. This can be used to reduce unwanted content.

      Important : When using NO_FDFXFADUMP or REDUCED_CONTENT you will lose the functionality of submitting data and saving data back to a PDF for acroform PDFs. If you intend to use these features do not use these modes.

      NO_MENU can be beneficial for users who do not want to use the provided menu for any converted form files.

      Possible values:

      • DEFAULT - No changes to the output
      • NO_FDFXFADUMP - Disable the FDFXFA_DUMP div from the output
      • NO_MENU - Disable the FDFXFA_MENU div from the output
      • REDUCED_CONTENT - Disable both FDFXFA_DUMP, FDFXFA_MENU from the output

      Also set in the JVM options with -Dorg.jpedal.pdf2html.outputContentMode=

      Parameters:
      outputContentMode - - The content mode for the desired output
    • setUseFormVuAPI

      public void setUseFormVuAPI(boolean value)
      Output the formvuapi.js file, which handles custom functionality such as submitting forms as JSON.

      Possible values:

      • true/false

      Default: true

      Also set with -Dorg.jpedal.pdf2html.useFormVuAPI=

      Parameters:
      value - Boolean true/false
    • getInlineJavaScriptAndCSS

      public boolean getInlineJavaScriptAndCSS()
    • setGenerateSearchFile

      public void setGenerateSearchFile(boolean value)
      Generates search.json. This file contains an array (one element per page) containing the textual content from each page. It is used by idrviewer.search.js for page search.

      search.json is always generated in the IDRViewer Complete UI. Search is not supported as standard in other IDRViewer UI modes.

      Possible value:

      • true/false

      Also set with -Dorg.jpedal.pdf2html.generateSearchFile=

      Overrides:
      setGenerateSearchFile in class OutputModeOptions
      Parameters:
      value - is of type boolean.
    • setOutputThumbnails

      public void setOutputThumbnails(boolean value)
      Output thumbnails of pages in /thumbnails/.

      Possible value:

      • true/false

      Default: false

      Thumnails are always generated if using the IDRViewer with ViewerUI Complete.

      Also set with -Dorg.jpedal.pdf2html.outputThumbnails=

      Overrides:
      setOutputThumbnails in class OutputModeOptions
      Parameters:
      value - is of type boolean.
    • setThumbnailMaxWidth

      public void setThumbnailMaxWidth(int value)
      Sets the maximum width of the thumbnails. Can be used in conjunction with setThumbnailMaxHeight. If both a width and height are given then the generated thumbnails will fit within the bounds given, maintaining the aspect ratio of the original page. If only a width or height is given then the size of the generated thumbnails will match the bound given, again maintaining the aspect ratio of the original page. Possible values:
      • Any positive integer
      Also set with -Dorg.jpedal.pdf2html.thumbnailMaxWidth=
      Overrides:
      setThumbnailMaxWidth in class OutputModeOptions
      Parameters:
      value - the maximum thumbnail width
    • setThumbnailMaxHeight

      public void setThumbnailMaxHeight(int value)
      Sets the maximum height of the thumbnails. Can be used in conjunction with setThumbnailMaxWidth. If both a width and height are given then the generated thumbnails will fit within the bounds given, maintaining the aspect ratio of the original page. If only a width or height is given then the size of the generated thumbnails will match the bound given, again maintaining the aspect ratio of the original page. Possible values:
      • Any positive integer
      Also set with -Dorg.jpedal.pdf2html.thumbnailMaxWidth=
      Overrides:
      setThumbnailMaxHeight in class OutputModeOptions
      Parameters:
      value - the maximum thumbnail height