Эх сурвалжийг харах

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

hellofinch 1 жил өмнө
parent
commit
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(