A component to embed PDF documents.

Fields

NameTypeDescriptionOptions
PDF sourceTextA valid URL. Alternatively, you can provide a state reference to a packed PDF file.
    HighlightsObjectA list of highlights to be applied to the PDF as a JSON array of strings.
      Selected highlight matchNumberThe index of the selected highlight match.
        PageNumberThe page to be displayed.
          ControlsTextShow controls to navigate the PDF.
          1. Yes
          2. No
          Container backgroundColor
            SeparatorColor
              Primary textColor
                Custom CSS classesTextCSS classes, separated by spaces. You can define classes in custom stylesheets.

                  Low code usage

                  This component can be declared directly in Python, using backend-driven UI.

                  ui.PDF(content={
                          "source": "", # str 
                          "highlights": {}, # Union[Dict, str] 
                          "selectedMatch": 0.0, # Union[float, str] 
                          "page": 0.0, # Union[float, str] 
                          "controls": "yes", # str [yes, no]
                          "containerBackgroundColor": "", # str 
                          "separatorColor": "", # str 
                          "primaryTextColor": "", # str 
                          "cssClasses": "", # str 
                      }
                  )
                  

                  Reference