I'm new to wxPython and pymupdf, and have had a look at the samples for wxPython + pymupdf. They work, however the quality of the pdf page (rendered) is pretty poor. I'm certain this can be improved. Basically I'm looking for an anti-aliasing solutoin. However I don't know how and haven't been able to find a sample online. Please can someone provide a sample for displaying PDFs using wxpython + pymupdf.
Here's what I have tried:
# https://pymupdf.readthedocs.io/en/latest/tutorial/#rendering-a-page
# if you used alpha=True (or letting default it):
bitmap = wx.Bitmap.FromBufferRGBA(pix.width, pix.height, pix.samples)
# if you used alpha=False:
bitmap = wx.Bitmap.FromBuffer(pix.width, pix.height, pix.samples)
And also this:
# http://code.activestate.com/recipes/580621-wxpython-pdf-xps-viewer-using-pymupdf-binding-for-/
pix = page.getPixmap(matrix = self.matrix)
bmp = wx.BitmapFromBuffer(pix.w, pix.h, pix.samplesRGB())