pymupdf / PyMuPDF

PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
https://pymupdf.readthedocs.io
GNU Affero General Public License v3.0
5.17k stars 495 forks source link

While extracting sound from a pdf file , I got an TypeError #3890

Closed dplcz closed 6 days ago

dplcz commented 6 days ago

Description of the bug

I have a pdf file with sound button. I want to extract them in pymupdf. But I got an TypeError: bad annot type.

How to reproduce the bug

I tried following code.

import sys
import pathlib
import fitz

doc = fitz.open("Big_Password_Removed.pdf")  # open PDF
page = doc[0]  # load desired page (0-based)
annot = page.first_annot  # access the desired annot (first one in example)
temp = annot.get_sound()
pass

PyMuPDF version

1.24.9

Operating system

Windows

Python version

3.9

dplcz commented 6 days ago

Big_Password_Removed.pdf This is my pdf file.

JorjMcKie commented 6 days ago

We do not support Screen annotations at all currently.