I am confused about how to display a PDF document at its true scale, i.e. scale = 100%.
NB: I am using python-poppler-qt4 .
Poppler-qt4 provides a method to get the true PDF size in points :
document = Poppler.Document.load('mypdf.pdf')
page = document.page(0)
size = page.pageSize()
Then, to make the page in QImage , you need to provide the resolution of the graphics device in dots per inch (DPI):
image = page.renderToImage(72, 72)
Now, since the natural size of the document is provided in dots (for example, 72 per inch), and the image renderer requires dots per inch, can I just assume that the natural size of the document is when its resolution is 72 DPI? Or points and points are two different measures? If I am wrong, what is the solution?
source
share