Anyone? Anyone?

S

Steve Williams

The following runs slow, as you might expect. I'm open to advice.

.. . .
def GetTotalPages(self):
self.PPIPrinterWidth = 100 #whatever
self.PPIPrinterHeight = 100 #whatever
self.screenscale = 1.0 #whatever
bitmap = wxEmptyBitmap(
PrinterDefinition['PageWidth'] * self.PPIPrinterWidth
,PrinterDefinition['PageHeight'] * self.PPIPrinterHeight)
DC = wxMemoryDC()
DC.SelectObject(bitmap)
self.page_total = 0
while self.DoDrawing(DC) <> False:
self.page_total += 1
return self.page_total
.. .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top