Skip to content

Commit

Permalink
set DPI using mupdf attributes
Browse files Browse the repository at this point in the history
Addresses 3414
  • Loading branch information
JorjMcKie committed Apr 29, 2024
1 parent c5856d3 commit 3d6863d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,11 @@ def get_pixmap(self, matrix=None, dpi=None, colorspace=None, alpha=0):
if not cs:
cs = mupdf.fz_device_rgb()

pix = mupdf.pdf_new_pixmap_from_annot( self.this, ctm, cs, mupdf.FzSeparations(0), alpha)
pix = mupdf.pdf_new_pixmap_from_annot(self.this, ctm, cs, mupdf.FzSeparations(0), alpha)
ret = Pixmap(pix)
if dpi:
pix.set_dpi(dpi, dpi)
return Pixmap( pix)
ret.set_dpi(dpi, dpi)
return ret

def get_sound(self):
"""Retrieve sound stream."""
Expand Down

0 comments on commit 3d6863d

Please sign in to comment.