   const db = libredwg.convert(dwg)
              const svgString = libredwg.dwg_to_svg(db)

              const parser = new DOMParser()
              const doc = parser.parseFromString(svgString, 'image/svg+xml')
              const svg = doc.documentElement
              const svgContainer = document.getElementById('svg-container')
              svgContainer.innerHTML = ''
              svgContainer.appendChild(svg)

              libredwg.dwg_free(dwg)
              document.getElementById('download-svg