[Gambas-user] Printing from the TextEdit html control
gaupe
hennie at ...1826...
Wed Jan 9 09:58:22 CET 2008
I am playing a little with this too and see in the last example that if you
do
Draw.Begin(Printer)
myreport.Preview()
Draw.End
it looks quit oke on the preview.
theres a print button in the preview window pressing that gives in the
console output the followig
QPainter::begin: Another QPainter is already painting this device;
An extended paint device can only be painted by one QPainter at a time.
QPainter::setFont: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setClipRegion: Will be reset by begin()
QPainter::setClipping: Will be reset by begin()
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setFont: Will be reset by begin()
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setClipping: Will be reset by begin()
manuel viet wrote:
>
>
> Richard Terry-2 wrote:
>>
>> Ok, This code (which I hope I've typed in your additions properly, gives
>> only
>> the same output as my original code (iedraw.RichText(TextEdit1.text, 0,
>> 0,
>> rth, rtw) - scrunched up unspaced output just fitting into 1cm at top of
>> page
>>
>> DIM myreport AS NEW Report
>> 'DIM hRichText AS ReportRichText
>> DIM hRichText AS ReportTextLabel
>> Printer.Setup()
>>
>> myreport.Size = "A4"
>> myreport.Resolution = Printer.Resolution
>> myreport.Padding = "1.5 cm"
>> myreport.Spacing = "0.3 cm"
>>
>> hRichText = NEW ReportTextLabel(myreport)
>> hRichText.Expand = TRUE
>> hRichText.Text = TextEdit1.text
>> Draw.Begin(Printer)
>> myreport.Draw(1)
>> Draw.End
>>
>> Did you test a simple example, does it work on your system? I'm keen to
>> get
>> this working as if I can most other obstacles to me starting a project
>> will
>> have been covered I think.
>>
>>
>
> I'm just making a wild guess, but I think you should
> set the WordWrap property of hRichText to TRUE.
>
> It may explain otherwise that your text is printed on
> a single line instead of spreading down.
>
> So far, it's the only relevant difference between
> your code and the example I've spotted.
>
--
View this message in context: http://www.nabble.com/Printing-from-the-TextEdit-html-control-tp14660012p14707594.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list