diff --git a/MainWindow.glade b/MainWindow.glade index d7f44ae..596f633 100644 --- a/MainWindow.glade +++ b/MainWindow.glade @@ -202,43 +202,50 @@ True 800 - + True - False + True + in - + True False - - + + True False - center - center - 5 - - + + True False - dialog-information + center + center + 5 + + + True + False + dialog-information + + + False + True + 0 + + + + + True + False + Open a file to begin + + + False + True + 1 + + - - False - True - 0 - - - - - True - False - Open a file to begin - - - False - True - 1 - @@ -247,7 +254,7 @@ True - True + False diff --git a/pdf_table_extractor.py b/pdf_table_extractor.py index 1091193..1db3bfc 100644 --- a/pdf_table_extractor.py +++ b/pdf_table_extractor.py @@ -41,7 +41,6 @@ class PdfPage(Gtk.DrawingArea): self.page: fitz.Page = page pix = self.page.get_pixmap(dpi=96) # type: ignore self.set_size_request(pix.width, pix.height) - print(f"w: {pix.width}, h: {pix.height}") self.set_app_paintable(True) # type: ignore self.connect("draw", self.on_draw, {}) @@ -49,7 +48,9 @@ class PdfPage(Gtk.DrawingArea): # app: Application = widget.get_window().get_application() # type: ignore width = widget.get_allocated_width() height = widget.get_allocated_height() - print(f"alloc w: {width}, h: {height}") + + cr.set_source_rgba(255, 255, 255) + cr.paint() sctx = widget.get_style_context() Gtk.render_background(sctx, cr, 0, 0, width, height) @@ -59,12 +60,6 @@ class PdfPage(Gtk.DrawingArea): cr.set_source_surface(ims, 0, 0) cr.paint() - cr.set_source_rgba(255, 0, 0) - cr.set_line_width(10) - cr.move_to(0, 0) - cr.line_to(width, height) - cr.stroke() - @Gtk.Template.from_file("MainWindow.glade") class MainWindow(Gtk.ApplicationWindow):