- export as SVG (File > Export Diagram As > SVG... > Save)
- open SVG file in web browser
- open console and run
document.querySelectorAll("text").forEach(e => e.innerHTML = e.innerHTML === "UNREGISTERED"? "":e.innerHTML)
- take screenshot
Just open the SVG file in a text editor and replace the UNREGISTERED text with empty
Thank you
Removing it would be better I think :)
document.querySelectorAll("text").forEach(e => e.textContent === "UNREGISTERED" && e.remove());
from bs4 import BeautifulSoup
def edit_svg_file(input_file_path, output_file_path):
try:
with open(input_file_path, 'r', encoding='utf-8') as file:
svg_content = file.read()
soup = BeautifulSoup(svg_content, 'xml')
for text_element in soup.find_all('text'):
if text_element.string == "UNREGISTERED":
text_element.string = ""
with open(output_file_path, 'w', encoding='utf-8') as file:
file.write(str(soup))
print(f'SVG file updated successfully and saved to {output_file_path}')
except Exception as e:
print(f'Error: {e}')
input_file_path = r"C:\Users\testuser\Downloads\UseCaseDiagram1.svg" #Update this with your source path
output_file_path = r"C:\Users\testuser\Downloads\output.svg"
edit_svg_file(input_file_path, output_file_path)
To Run this
pip install beautifulsoup4
Then run it
thx
is there any to achieve that if I'm using ubuntu? if so, please let me know how to