Frank Millman wrote:
> Complete app attached.
Chris Barker wrote:
I've tried it out, and got somewhat different results from you.
- When I run it, the print preview looks fine, but the resulting
postscript has HUGE fonts. What version of Python/wxPython are you
running? I'm running Python2.3, wxPython 2.4.2.4
Python 2.2.3, wxPython 2.4.1.2u, compiled for GTK2.
I doubt if Python is the problem, but wxPython could be. I will upgrade this
weekend, and report any results. If I have time, I will try it with GTK1 and
GTK2.
- You have commented out the line:
print dc.GetPointSize() # linux=10, MSW crashes, but I think it is 16shouldn't this be font.GetPointSize ?
I replaced it with font.GetPointSize, and get 12.
Oops - you are correct. For some reaon, under MSW, if you do 'font =
dc.GetFont()', and try to retrieve any of the default font attributes using
any of the Get...() methods, it crashes with 'wxPyAssertionError in
font.cpp - invalid font'. However, this is not a major problem.
> > > Raw text - I tried both ps2ascii and pstotext to extract the text
from
I don't seem to have pstotext on my system (RedHat 7.2) so I couldn't
try that. ps2ascii works fine, but without any line breaks.
pstotext it is not standard - I had to download it from the net. I got the
info from the ghostscript documentation, where it states that ps2ascii is
not very clever, and a couple of people have written much better text
extractors.
I've you tried to embed and image a postscript output yet? I havn't.
I printed the page from PrintFramework.py in the demo, which contains a
combination of images and text. The images came out fine - resolution is not
as good as MSW, but not too bad.
I have now tried HtmlEasyPrinting. MSW prints ok, Linux comes out as a tiny
row of dots again, and also takes about 5 seconds to print. Something
strange is going on. I will let you know what happens after I upgrade
wxPython.
Thanks again for your time, Chris.
Frank