Print page as pdf without sidebar and widgets

Anyway to print the current instance as a pdf without the sidebar with a button on the sidebar? Would be even better if I could do it without any widgets in the main page too.

1 Like

Ok I did a work around for hiding widgets for printing. Just put a “Hide Widgets” check box in the sidebar and then an if not hide_widgets: before each widget. Would be great if there was a function like st.print(sidebar=False, printer=“PDF”).

1 Like