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

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top