-
Notifications
You must be signed in to change notification settings - Fork 692
Open
Labels
Description
Description of the bug
Starting from v 1.26.6 page.get_svg_image() generates svg with inverted colors in jpeg.
How to reproduce the bug
Here simple code
def pdf_to_svg(pdf_path, output_svg_path):
with fitz.open(pdf_path) as doc:
page = doc[0]
svg_content = page.get_svg_image()
with open(output_svg_path, "w", encoding="utf-8") as f:
f.write(svg_content)
if __name__ == "__main__":
pdf_to_svg("test1.pdf", "test1.svg")
Test pdf and results for different versions attached.
PyMuPDF version
1.26.6
Operating system
Windows
Python version
3.11
Reactions are currently unavailable