Open geoflipman opened 6 years ago
I don't understand this library very deeply, but changing line 422 to
self.xpageoffset = 0
solves the problem for the cases I have looked at.
Yes you are right. It works correctly in wxPython Classic but some changes I made around September 2016 to remove the cacheing of rendered pages meant that for some reason self.xpageoffset
should now always be zero. I will submit a pull request to fix this, thanks.
Operating system: Windows 10 wxPython version & source: 4.0.3, I think source was pypi Python version & source: 2.7.13, stock
Description of the problem: pdfViewer.xpageoffset is erroneously set under certain scrolling conditions. Under these conditions the left side of the PDF page cannot be seen in the viewer window even when scrolling to the left. I have tried this with 3 different pdfs, under 3 different zoom levels,
Steps to reproduce: This bug can be reproduced by running the demo viewer: https://github.com/wxWidgets/Phoenix/blob/master/demo/PDFViewer.py But I have also included code that more easily shows the problem below
The example below demonstrates the problem. Left-double-click in the window to print current value of xpageoffset. The last line in OnLoadButton is a convenient place to set the zoom level.
I'm guessing the problem starts here:
https://github.com/wxWidgets/Phoenix/blob/d49953b7cd12eec1689382c81fd7ea9460ebe20b/wx/lib/pdfviewer/viewer.py#L422