Delete the Button of "Export as PDF" in HTML and Cancel Font Embedding
Showing
1 changed file
with
3 additions
and
4 deletions
| @@ -259,9 +259,8 @@ class HTMLRenderer: | @@ -259,9 +259,8 @@ class HTMLRenderer: | ||
| 259 | jspdf_tag = f"<script>{jspdf}</script>" if jspdf else '<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>' | 259 | jspdf_tag = f"<script>{jspdf}</script>" if jspdf else '<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>' |
| 260 | mathjax_tag = f"<script defer>{mathjax}</script>" if mathjax else '<script defer src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>' | 260 | mathjax_tag = f"<script defer>{mathjax}</script>" if mathjax else '<script defer src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>' |
| 261 | 261 | ||
| 262 | - # 加载PDF字体数据 | ||
| 263 | - pdf_font_data = self._load_pdf_font_data() | ||
| 264 | - pdf_font_script = f"<script>window.pdfFontData = '{pdf_font_data}';</script>" if pdf_font_data else "" | 262 | + # PDF字体数据不再嵌入HTML,减小文件体积 |
| 263 | + pdf_font_script = "" | ||
| 265 | 264 | ||
| 266 | return f""" | 265 | return f""" |
| 267 | <head> | 266 | <head> |
| @@ -358,7 +357,7 @@ class HTMLRenderer: | @@ -358,7 +357,7 @@ class HTMLRenderer: | ||
| 358 | <div class="header-actions"> | 357 | <div class="header-actions"> |
| 359 | <button id="theme-toggle" class="action-btn" type="button">🌗 主题切换</button> | 358 | <button id="theme-toggle" class="action-btn" type="button">🌗 主题切换</button> |
| 360 | <button id="print-btn" class="action-btn" type="button">🖨️ 打印</button> | 359 | <button id="print-btn" class="action-btn" type="button">🖨️ 打印</button> |
| 361 | - <button id="export-btn" class="action-btn" type="button">⬇️ 导出PDF</button> | 360 | + <button id="export-btn" class="action-btn" type="button" style="display: none;">⬇️ 导出PDF</button> |
| 362 | </div> | 361 | </div> |
| 363 | </header> | 362 | </header> |
| 364 | """.strip() | 363 | """.strip() |
-
Please register or login to post a comment