The version of wx/lib/pdfviewer/viewer.py in wxPython-4.0.0a1 was tested using PyMuPDF 1.92 and Python 3.4 on both Windows 10 and OS X in July 2016. The Windows machine has since been rebuilt with the March 2017 release of Windows 10 and has Python 3.6. I have just installed the pre-built Windows version of PyMuPDF 1.10.0.0 there from https://github.com/JorjMcKie/PyMuPDF-optional-material which has the associated comment “Defaulting alpha=True b/o backward compatibility” and the pdf viewer works fine with it. On the line you refer to, in the call to wx.Bitmap.FromBufferRGBA(pix.width, pix.height, pix.samples) the len of pix.samples is width * height * 4.
MuPDF 1.10-rc1 (2016-11-09) : Alpha channel is now optional in pixmaps.
···
Am Dienstag, 25. April 2017 14:05:30 UTC+2 schrieb David Hughes:
The version of wx/lib/pdfviewer/viewer.py in wxPython-4.0.0a1 was tested using PyMuPDF 1.92 and Python 3.4 on both Windows 10 and OS X in July 2016. The Windows machine has since been rebuilt with the March 2017 release of Windows 10 and has Python 3.6. I have just installed the pre-built Windows version of PyMuPDF 1.10.0.0 there from https://github.com/JorjMcKie/PyMuPDF-optional-material which has the associated comment “Defaulting alpha=True b/o backward compatibility” and the pdf viewer works fine with it. On the line you refer to, in the call to wx.Bitmap.FromBufferRGBA(pix.width, pix.height, pix.samples) the len of pix.samples is width * height * 4.