emacs-application-framework icon indicating copy to clipboard operation
emacs-application-framework copied to clipboard

Can't open pdf

Open jenenliu opened this issue 5 months ago • 6 comments

Describe the bug Cant Open a pdf file

To Reproduce eaf-open, select a pdf file, nothing happend

Expected behavior open pdf

Versions (please complete the following info):

  • Distro and DE/WM: Arch Linux, Gnome
  • Versions of Dependencies:
  • M-x emacs-version: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-02-01

Error logs Please check the *eaf* buffer, if there is any error in it, paste it here.

Traceback (most recent call last):
  File "/usr/share/emacs/lazycat/extensions/emacs-application-framework/app/pdf-viewer/eaf_pdf_widget.py", line 499, in paintEvent
    self.draw_scroll_pages(painter)
  File "/usr/share/emacs/lazycat/extensions/emacs-application-framework/app/pdf-viewer/eaf_pdf_widget.py", line 559, in draw_scroll_pages
    (_, _, page_render_height) = self.get_page_render_info(self.start_page_index)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/emacs/lazycat/extensions/emacs-application-framework/app/pdf-viewer/eaf_pdf_widget.py", line 411, in get_page_render_info
    qpixmap = self.get_page_pixmap(index, self.scale * hidpi_scale_factor, self.rotation)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/emacs/lazycat/extensions/emacs-application-framework/app/pdf-viewer/eaf_pdf_widget.py", line 396, in get_page_pixmap
    qpixmap = page.get_qpixmap(scale, self.get_inverted_mode(), self.inverted_image_mode)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/emacs/lazycat/extensions/emacs-application-framework/app/pdf-viewer/eaf_pdf_page.py", line 193, in get_qpixmap
    pixmap = self.make_background_transparent(pixmap, sample_color[:3])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/emacs/lazycat/extensions/emacs-application-framework/app/pdf-viewer/eaf_pdf_page.py", line 260, in make_background_transparent
    pixalpha = fitz.Pixmap(None, pixmap)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jenenliu/.local/lib/python3.11/site-packages/fitz/__init__.py", line 9690, in __init__
    raise Exception( text)
Exception: Unrecognised args for constructing Pixmap:
    <class 'NoneType'>: None
    <class 'fitz.Pixmap'>: Pixmap(DeviceRGB, (0, 0, 2560, 3170), 1)

Process *eaf* aborted (core dumped)
doh set to ""  --  SystemOnly
[EAF] Browser https://github.com/emacs-eaf/emacs-application-framework loading time: 5.172097206115723s
[EAF] Browser https://github.com/emacs-eaf/emacs-application-framework/issues/new/choose loading time: 1.6242930889129639s
[EAF] Browser https://github.com/emacs-eaf/emacs-application-framework/issues/new?assignees=&labels=&projects=&template=bug_report.md&title= loading time: 0.9911534786224365s

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

jenenliu avatar Feb 01 '24 13:02 jenenliu