How to update / force render a custom panel

WebViewer Version: 8.2.0-20220119

Are you using the WebViewer server? No

I’m created a custom panel using setCustomPanel and activated it with setActiveLeftPanel. The panel should show information about the document and the applied modifcations. After the document was changed I need to update the information inside the panel. How is it possible to enforce the panel to get rendered again with the current informations? Calling setActiveLeftPanel won’t re-render the panel again.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:



Thank you for contacting WebViewer’s support. We currently don’t have an API for forcing re rendering of the custom panel but you can achieve this by quickly disabling and enabling it like the following

Webviewer({}, document.getElementById('viewer')).then(instance => {
  let count = 0;

  const renderFunc = () => {
    const div = document.createElement('div');
    const div2 = document.createElement('div');

    div2.innerHTML = `Hello World ${count}`;

    const btn = document.createElement("button");
    btn.innerHTML = "count";
    btn.type = "submit"; = "formBtn";
    btn.onclick = function () {
    return div;

  const myCustomPanel = {
      dataElement: 'customPanelTab',
      title: 'customPanelTab',
      img: '',
    panel: {
      dataElement: 'customPanel',
      render: renderFunc


Please let me know if the above helps or if you want me to clarify something

Best Regards,

Andrew Yip
Software Developer
PDFTron Systems, Inc.