Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save praneeth-katuri/c1152a88b51005cd57c714a6cbaf9e1f to your computer and use it in GitHub Desktop.

Select an option

Save praneeth-katuri/c1152a88b51005cd57c714a6cbaf9e1f to your computer and use it in GitHub Desktop.
Instructions for removing the watermark from StarUML diagrams exported as SVG files.

Remove "UNREGISTERED" watermark from SVG file

Steps:

  1. Export as SVG:

    • Open your diagram in starUML.
    • Go to "File" > "Export Diagram As" > "SVG..." and save the file.
  2. Open SVG file in a web browser:

    • Locate the saved SVG file on your computer.
    • Right-click on the file and select "Open with" > Chrome/Firefox/[Your Web Browser].
  3. Open the browser console and allow pasting:

    • Once the SVG file is open in the web browser, right-click anywhere on the page and select "Inspect" or press Ctrl + Shift + I (Cmd + Option + I on Mac) to open the Developer Tools.
    • In the Developer Tools window, navigate to the "Console" tab.
    • If pasting into the console is restricted, type "allow pasting" (or a similar phrase specified by your browser) directly into the console and press Enter.
    • Copy and paste the following JavaScript code into the console and press Enter:
      document.querySelectorAll("text").forEach(e => e.innerHTML = e.innerHTML === "UNREGISTERED" ? "" : e.innerHTML)
  4. Take a screenshot:

    • After running the JavaScript code in the console, your SVG should no longer display the "UNREGISTERED" watermark.
    • Use your system's screenshot functionality to capture the modified SVG.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment