This commit is contained in:
2025-12-16 00:38:52 +01:00
parent 6608032f0c
commit 8cbba4cb45
11 changed files with 62 additions and 66 deletions

View File

@@ -64,10 +64,10 @@ def convert_to_png(diagrams):
with open(temp_file, 'w', encoding='utf-8') as f:
f.write(diagram['code'])
# Convert using mmdc with higher resolution for better readability
# Convert using mmdc with moderate size for page fit
try:
result = subprocess.run(
[MMDC, '-i', temp_file, '-o', output_file, '-b', 'white', '-w', '1600', '-s', '2'],
[MMDC, '-i', temp_file, '-o', output_file, '-b', 'white', '-w', '800', '-s', '1.5'],
capture_output=True,
text=True,
timeout=60