فهرست منبع

feat (gui) : 调整PDF预览大小

hellofinch 1 سال پیش
والد
کامیت
448eae51a0
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      pdf2zh/gui.py

+ 5 - 1
pdf2zh/gui.py

@@ -326,6 +326,10 @@ custom_css = """
     .progress-bar {
         border-radius: 8px !important;
     }
+
+    .pdf-canvas canvas {
+        width: 100%;
+    }
     """
 
 demo_recaptcha = """
@@ -498,7 +502,7 @@ with gr.Blocks(
 
         with gr.Column(scale=2):
             gr.Markdown("## Preview")
-            preview = PDF(label="Document Preview", visible=True)
+            preview = PDF(label="Document Preview", visible=True, height=2000)
 
     # Event handlers
     file_input.upload(