New topic: 

Is there a trick to getting straight lines to print?

<http://forums.realsoftware.com/viewtopic.php?t=37061>

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        jjfcpa          Post subject: Is there a trick to getting 
straight lines to print?Posted: Thu Jan 13, 2011 9:00 am                        
 
Joined: Tue Apr 17, 2007 9:19 pm
Posts: 224                I noticed that using the g.drawline statement, it's 
will not print a straight line in Windows or on the Mac.  We've tried different 
printers, verified that the printer is straight in the printer, and it's always 
about 1/2 to 1 mm higher on the right edge of the paper.   
                             Top                 jharris          Post subject: 
Re: Is there a trick to getting straight lines to print?Posted: Thu Jan 13, 
2011 9:25 am                         
Joined: Wed Aug 05, 2009 6:32 am
Posts: 75
Location: Mountain Home, AR                I just printed a line with 
g.drawline and default resolution, it worked as expected. (Using Windows 7 and 
HP Inkjet  Printer). Which version of RS are you using?      
_________________
RB Pro 2010R4
Windows 7/Ubuntu 9.04  
                             Top                 DaveS          Post subject: 
Re: Is there a trick to getting straight lines to print?Posted: Thu Jan 13, 
2011 11:09 am                                 
Joined: Sun Aug 05, 2007 10:46 am
Posts: 2762
Location: San Diego, CA                If you are drawing a horizontal line on 
the Printer Graphics Object and that line is NOT horizontal on paper, then it 
is the fault of your printer [or printer driver]

try this [using a printer graphics object a "g"]

Code:g.drawrect 0,0,g.width-1,g.height-1
g.drawline 0,0,g.width-1,g.height-1
g.drawline g.width-1,0,0,g.height-1
g=nil


that should give a perfect rectangle with a X ....      
_________________
Dave Sisemore
MacPro, OSX 10.6.4 RB2009r5.1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top                jefftullin          Post 
subject: Re: Is there a trick to getting straight lines to print?Posted: Thu 
Jan 13, 2011 12:27 pm                                 
Joined: Wed Nov 15, 2006 3:50 pm
Posts: 2066
Location: England                Is the paper rectangular?
Does your printer driver allow for free rotation of the image?
What happens if you use another program like Word to print a horizontal line on 
the same printer?   
                             Top                jjfcpa          Post subject: 
Re: Is there a trick to getting straight lines to print?Posted: Thu Jan 13, 
2011 8:42 pm                         
Joined: Tue Apr 17, 2007 9:19 pm
Posts: 224                Thanks for the interesting replies.  I know it's hard 
to believe, but I've had 3 people look at this and they are getting the same 
results as myself.  

FYI - I'm using an HP4250n and also tested on an HP2035.  Same results.  

Tried it on RB/Mac 2010r4.1 and RB/Win 2010r4.1.  I've got 2010r5.1, but did 
not test it on that yet.

Here is the offending line:

g.DrawLine nCol1,nBottomMargin - LineSpacing,nRightMargin,nBottomMargin - 
LineSpacing

where nCol1 = 0
nBottomMargin = g.height - LineSpacing  (I'm trying to draw a line and then put 
the date and page number below it, that's why I'm deducting the LineSpacing 
variable)

nRightMargin = g.width - 1

I'm using Joe Huber's routine to get a proper printersetup object.   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to