Normal Topic printstring & landscape (Read 1844 times)
beagle
Junior Member
**
Offline


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
printstring & landscape
Sep 14th, 2004 at 7:40am
Print Post Print Post  
Hi,

Hopefully an easy question

Is it possible to print in landscape orentation when using printstring, or does the printer need to be set to landscape outside of Sesame ?

many thanbks in advance
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: printstring & landscape
Reply #1 - Sep 14th, 2004 at 10:36am
Print Post Print Post  
If your printer is facing east/west, you need to turn it 90 degrees to face north/south - or vice-versa. Smiley If that doesn't work, and you are in the northern hemisphere, drive south until you cross the equator, at which point it will usually begin to print on the other side of the paper. Smiley

Sorry - couldn't help myself.

Portrait mode is the default. I am looking into SBasic commands that allow setting printer defaults like orientation and margins. I'll see if I can slip some of these under the feature freeze for 1.0.5. Its difficult, in that Sesame is cross platform, and printers are handled very differently between Unix and Windows. In fact, printers is one of the few areas where Windows is better than Unix (IMHO).
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: printstring & landscape
Reply #2 - Sep 14th, 2004 at 11:06am
Print Post Print Post  
Beagle,

I just tried PrintString, having first set my printer's default (in the printer dialog external to Sesame) to Landscape, and Printstring did indeed print in landscape mode. So yes, set it externally. The PrintString commands do not themselves set it one way or the other, but rely on how the printer has been set.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: printstring & landscape
Reply #3 - Sep 14th, 2004 at 4:27pm
Print Post Print Post  
Set up two Windows printers for the same physical printer and port.  One configured to default to Portrait mode, and one to default to Landscape mode.

Now you can use the following utility to set the default printer: Quote:
defprint /d "PortraitPrinterName"'
or
defprint /d "LandscapePrinterName"'
It accepts either the printer share name or the port

It could be sent with @Shell command before doing the printing and followed by another @Shell command to reset back to the normal default printer.

Run DefPrint in DOS window for more information
defprint /p will show the available printers with information like the following: Quote:
C:>defprint /p
PrinterName: mondohplaser
ServerName: (null)
PortName: mondohplaser
DriverName: HP LaserJet 1200 Series PCL
PrintProcessor: WinPrint
ShareName: (null)


Now the Default Printer can be changed with something like this:
Quote:
C:>defprint /D mondohplaser
Found 4 printers
Changing default printer...

or

C:>defprint /D LPT1:
Found 4 printers
Changing default printer...


This freeware utility is available at  http://www.netadmintools.com/defprint.zip

PS, re Mark's comments on heading South.  If you stop AT the Equator, the printer starts spinning in all directions and turns into a Shredder.  Lesson:  Do not stop exactly on the Equator, be sure to be above or below it.  Have not had a chance to determine the affected longitude range but it is probably more than one pixel in distance.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: printstring & landscape
Reply #4 - Sep 14th, 2004 at 5:12pm
Print Post Print Post  
You can also use the AlternateDefaultPrinter() command in SBasic, and set-up two "virtual" printers (the same physical printer) with different mode (landscape versus portrait) settings.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: printstring & landscape
Reply #5 - Sep 14th, 2004 at 7:12pm
Print Post Print Post  
Nice tool.  Well kept secret.  Grin

I see it listed in your list of funcitons for 1.0.4.

I cannot find it in the Programming Guide (pre 1.0.4), but I cannot find it in the 104 Supplement either!  Perhaps I am missing that page?  ???

I haven't gone through the whole list, but are there others that may also not be referenced in the supplement?  ? ?
Aha!  Answer is YES!.  I also see RestoreDefaultPrinter in your list for 1.0.4. 



  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: printstring & landscape
Reply #6 - Sep 14th, 2004 at 7:22pm
Print Post Print Post  
Bob,

These commands are not documented for 1.0.4 because, while they were implemented, they had not been tested. Therefore, we didn't announce them. They will be documented with 1.0.5.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
beagle
Junior Member
**
Offline


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: printstring & landscape
Reply #7 - Sep 14th, 2004 at 10:36pm
Print Post Print Post  
If your printer is facing east/west, you need to turn it 90 degrees to face north/south - or vice-versa.  If that doesn't work, and you are in the northern hemisphere, drive south until you cross the equator, at which point it will usually begin to print on the other side of the paper. 

OK - i'm in Australia, so...................... I'll just go & have a beer - that'l help me see things more clearly & obviously i'll have to reverse this instructions above Smiley

Thanks for your help on this one
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: printstring & landscape
Reply #8 - Sep 14th, 2004 at 10:58pm
Print Post Print Post  
Just a reminder beagle, that my note about the Equator is good for both hemispheres.  8)

And the defprint utility can be used for all Windows programs, not just for Sesame.  Include it in batch files.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged