Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

fix: adjust iframe height and enhance HTML label visibility in document preview

myhloli031f6ec3bf49
diff --git a/mineru/cli/gradio_app.py b/mineru/cli/gradio_app.py
index f93481fd..fdc857e7 100644
--- a/mineru/cli/gradio_app.py
+++ b/mineru/cli/gradio_app.py
@@ -275,7 +275,7 @@ def update_file_preview(file_path, request: gr.Request):
viewer_url = f"https://view.officeapps.live.com/op/embed.aspx?src={public_url}"
html_content = (
f'<iframe src="{viewer_url}" '
- f'width="100%" height="800px" frameborder="0" '
+ f'width="100%" height="960px" frameborder="0" '
f'style="border: none;"></iframe>'
)
return (
@@ -525,7 +525,7 @@ def main(ctx,
change_bu = gr.Button(i18n("convert"))
clear_bu = gr.ClearButton(value=i18n("clear"))
doc_show = PDF(label=i18n("doc_preview"), interactive=False, visible=True, height=800)
- office_html = gr.HTML(value="", visible=False)
+ office_html = gr.HTML(label=i18n("doc_preview"), show_label=True, value="", visible=False)
if example_enable:
example_root = os.path.join(os.getcwd(), 'examples')
if os.path.exists(example_root):