class PDFWidget(QWidget):
def __init__(self, filename, dpi=72):
super().__init__()
self.filename = filename
// Using Poppler from gi.repository:
After Change
// Poppler page numbering starts from 0 but that"s not what
// most PDF users will expect, so subtract:
if pageno > 0:
pageno -= 1
self.page = self.document.page(pageno)
pagesize = self.page.pageSize()