Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Sep 26, 2018 9:48 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Printing window as an A4 format. need suggestions.
PostPosted: Sat Dec 01, 2012 4:40 pm 
Offline

Joined: Sat Feb 04, 2012 1:26 pm
Posts: 86
Location: Italy
I have to implement the possibility to print an A4 format letter containing the info about the sender, the receiver, the print date, the body and so on. All the stuff is always printed on a single A4 sheet, as the body is always the same. I was thinking about putting those several elements inside different textarea controls.
The windows should be fully display inside the monitor while the print is on A4 format.
Any suggestion? eventought it should involve different way to accomplish this task?
thansk for helping,
Antonio.


Top
 Profile  
Reply with quote  
 Post subject: Re: Printing window as an A4 format. need suggestions.
PostPosted: Sat Dec 01, 2012 5:23 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Where is the problem?

On the window you have some controls to work with whatever data you have.

And than there is somewhere a print button where you use OpenPrinterDialog to get a graphics object. And there you can draw whatever you like.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Printing window as an A4 format. need suggestions.
PostPosted: Sun Dec 02, 2012 2:52 pm 
Offline

Joined: Sat Feb 04, 2012 1:26 pm
Posts: 86
Location: Italy
Quote:
Where is the problem?

the problem is, that's my first time trying to print something.

Anyway I tryed the following code; it works how I wished ( except text arriving at the very edge of the page) but I don't know if this is the right way to manage it.

Dim stp1, stp2, stp3, stp4 As StyledTextPrinter

Dim g As Graphics

g = OpenPrinterDialog
If g <> Nil Then
stp1 = textarea1.StyledTextPrinter(g,72*11.69)
stp2 = textarea2.StyledTextPrinter(g,72*11.69)
stp3 = textarea3.StyledTextPrinter(g,72*11.69)
stp4 = textarea4.StyledTextPrinter(g,72*11.69)

stp1.DrawBlock(20, 10, 72*16.54)
stp2.DrawBlock(400, 10, 72*16.54)
stp3.DrawBlock(20, 180, 72*16.54)
stp4.DrawBlock(350, 420, 72*16.54)
End If


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group