1. landscape printing

I have searched through the forum and the documentation and can't find 
any way to tell the printer to print in landscape mode.  I don't want to 
rely on the operator selecting landscape mode, because they will 
probably forget.  Is there a way to force the printer into landscape 
mode, and if so, how do I do it?

new topic     » topic index » view message » categorize

2. Re: landscape printing

Couldn't you check to size of the page, and if the x > y, then it's
landscape, and if the x < y then it's portrait? If its not what you want,
tell the user to change it and try again. I did this in a program I wrote.

----- Original Message -----
From: "Ron Austin" <ronaustin at alltel.net>
To: <EUforum at topica.com>
Subject: landscape printing


>
>
> I have searched through the forum and the documentation and can't find
> any way to tell the printer to print in landscape mode.  I don't want to
> rely on the operator selecting landscape mode, because they will
> probably forget.  Is there a way to force the printer into landscape
> mode, and if so, how do I do it?
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: landscape printing

----- Original Message ----- 
From: "Ron Austin" <ronaustin at alltel.net>
To: <EUforum at topica.com>
Subject: RE: landscape printing


> 
> 
> Well, it's been two weeks since I originally asked the question about 
> forcing the windows printer into landscape mode.  I wish Derek or one of 
> the other smart people out there would change win32lib.ew so you could 
> tell the printer to print landscape or portrait.

If I knew I would have answered your query by now. 

Not answering either means I don't know or I did read your note. It never means
I can't be bothered.

I guess I'll read the manual (Windows API) and try to find out for you. 

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

4. Re: landscape printing

** Correction **
----- Original Message ----- 
From: "Derek Parnell" <ddparnell at bigpond.com>
To: <EUforum at topica.com>
Subject: Re: landscape printing


[snip]

Not answering either means I don't know or I did NOT read your note. It never
means I can't be bothered.

new topic     » goto parent     » topic index » view message » categorize

5. Re: landscape printing

On Sat, 27 Dec 2003 05:23:14 +0000, Ron Austin <ronaustin at alltel.net>
wrote:

>Well, it's been two weeks since I originally asked the question about 
>forcing the windows printer into landscape mode.  I wish Derek or one of 
>the other smart people out there would change win32lib.ew so you could 
>tell the printer to print landscape or portrait.

Sorry Ron, I managed to completely corrupt my Inbox & Outbox last
month, and lost quite a few messages. I read your message but didn't
get round to replying before the crash. I hope this gets through;
there are still a few random (un)funnies happening.

If you download my print preview and report generator, you will find a
file win32prt.ew which contains replacement routines for the win32lib
print functions. The file support.ew also contains a routine
printButton which sets up landscape etc. You will need to:
1) edit win32lib and make "atom printer" global
2) make a copy of routine printButton from support.ew and edit to your
needs. At the very least you will need to delete the call to
initialise_pprg if you're not using the report generator.

Let me know if you can get my report generator demo to run,

Regards,
Pete
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html

new topic     » goto parent     » topic index » view message » categorize

6. Re: landscape printing

Hi,

It also should be noted that win32lib is not ready for commercial application at
present
although great strides are being made by many to make it so but much more work
is needed.

I hope Derek will make his speach he makes (again) about this...

If you dont know API then you will never understand how your program functions
and this is
what makes win32lib so volitile...(In my opinion)

The Platform-SDK can be found here: 
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

Derek, Matt, Al, Robert Craig, Myself and many-many others (sorry to leave any
API gurus out)
have all had to read this, why not you?

CreateDC
The CreateDC function creates a device context (DC) for a device using the
specified name.

HDC CreateDC(
  LPCTSTR lpszDriver,        // driver name
  LPCTSTR lpszDevice,        // device name
  LPCTSTR lpszOutput,        // not used; should be NULL
  CONST DEVMODE* lpInitData  // optional printer data
);-- The last CONST DEVMODE* lpInitData is provided below for you...DEVMODE
The DEVMODE data structure contains information about the initialization and
environment of a printer or a display device.

typedef struct _devicemode { 
  BCHAR  dmDeviceName[CCHDEVICENAME]; 
  WORD   dmSpecVersion; 
  WORD   dmDriverVersion; 
  WORD   dmSize; 
  WORD   dmDriverExtra; 
  DWORD  dmFields; 
  union {
    struct {
      short dmOrientation;
      short dmPaperSize;
      short dmPaperLength;
      short dmPaperWidth;
      short dmScale; 
      short dmCopies; 
      short dmDefaultSource; 
      short dmPrintQuality; 
    };
    POINTL dmPosition;
    DWORD  dmDisplayOrientation;
    DWORD  dmDisplayFixedOutput;
  };

  short  dmColor; 
  short  dmDuplex; 
  short  dmYResolution; 
  short  dmTTOption; 
  short  dmCollate; 
  BYTE  dmFormName[CCHFORMNAME]; 
  WORD  dmLogPixels; 
  DWORD  dmBitsPerPel; 
  DWORD  dmPelsWidth; 
  DWORD  dmPelsHeight; 
  union {
    DWORD  dmDisplayFlags; 
    DWORD  dmNup;
  }
  DWORD  dmDisplayFrequency; 
#if(WINVER >= 0x0400) 
  DWORD  dmICMMethod;
  DWORD  dmICMIntent;
  DWORD  dmMediaType;
  DWORD  dmDitherType;
  DWORD  dmReserved1;
  DWORD  dmReserved2;
#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
  DWORD  dmPanningWidth;
  DWORD  dmPanningHeight;
#endif
#endif /* WINVER >= 0x0400 */
} DEVMODE; Have fun!

Euman


----- Original Message ----- 
From: "Ron Austin" <ronaustin at alltel.net>
To: <EUforum at topica.com>
Sent: Saturday, December 27, 2003 8:14 AM
Subject: RE: landscape printing


> 
> 
> Derek Parnell wrote:
> > 
> > 
> > ----- Original Message ----- 
> > From: "Ron Austin" <ronaustin at alltel.net>
> > To: <EUforum at topica.com>
> > Sent: Saturday, December 27, 2003 4:23 PM
> > Subject: RE: landscape printing
> > 
> > 
> > > Well, it's been two weeks since I originally asked the question about 
> > > forcing the windows printer into landscape mode.  I wish Derek or one of 
> > > 
> > > the other smart people out there would change win32lib.ew so you could 
> > > tell the printer to print landscape or portrait.
> > 
> > If I knew I would have answered your query by now. 
> > 
> > Not answering either means I don't know or I did read your note. It 
> > never means I can't be bothered.
> > 
> > I guess I'll read the manual (Windows API) and try to find out for you. 
> > 
> > -- 
> > Derek
> > 
> >I did not mean to imply that you can't be bothered.  I appreciate what 
> >you, Euman, Judith, Pete and others have contributed to this forum.  
> >Although I have 20 years experiance writing code in Basic, I am at a 
> >complete loss when it comes to C and API.  I hope to correct that, but 
> >until I do, I really need your help.
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
>

new topic     » goto parent     » topic index » view message » categorize

7. Re: landscape printing

On Sat, 27 Dec 2003 19:44:03 +0000, Ron Austin <ronaustin at alltel.net>
wrote:

>Sorry, silly me.  I thought this was a place to come and get help, not a 
>place where I would get lectured on programing practices.

Welcome to the (normally sane but oft)warped mind of Euman

>Euman wrote:
<snip>
>> It also should be noted that win32lib is not ready for commercial 
>> application at present
fair. My I ask...
>> although great strides are being made by many to make it so but much 
>> more work is needed.
true.    ...why you bring this up?
>> 
>> I hope Derek will make his speach he makes (again) about this...
He'll probably not bother
>> 
>> If you dont know API then you will never understand how your program 
>> functions 
False. False in spades. False as False can possibly be.

What gives you (Euman) the right to open up a criticism of win32lib
when you never give a damn thing to help it out; what when no bug has
been reported; when it works as advertised, when the Ide runs just
fine. etc etc.

I don't care if you dislike it: why, exactly, repeatedly dis it??

Small dick syndrome, if you ask me.

All the best and happy new year(!),
Pete
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html

new topic     » goto parent     » topic index » view message » categorize

8. Re: landscape printing

hehehe


----- Original Message ----- 
From: "Pete Lomax" <petelomax at blueyonder.co.uk>
To: <EUforum at topica.com>
Subject: Re: landscape printing


> 
> 
> On Sat, 27 Dec 2003 19:44:03 +0000, Ron Austin <ronaustin at alltel.net>
> wrote:
> 
> >Sorry, silly me.  I thought this was a place to come and get help, not a 
> >place where I would get lectured on programing practices.
> 
> Welcome to the (normally sane but oft)warped mind of Euman
> 
> >Euman wrote:
> <snip>
> >> It also should be noted that win32lib is not ready for commercial 
> >> application at present
> fair. My I ask...
> >> although great strides are being made by many to make it so but much 
> >> more work is needed.
> true.    ...why you bring this up?
> >> 
> >> I hope Derek will make his speach he makes (again) about this...
> He'll probably not bother
> >> 
> >> If you dont know API then you will never understand how your program 
> >> functions 
> False. False in spades. False as False can possibly be.
> 
> What gives you (Euman) the right to open up a criticism of win32lib
> when you never give a damn thing to help it out; what when no bug has
> been reported; when it works as advertised, when the Ide runs just
> fine. etc etc.
> 
> I don't care if you dislike it: why, exactly, repeatedly dis it??
> 
> Small dick syndrome, if you ask me.
> 
> All the best and happy new year(!),
> Pete
> http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
>

new topic     » goto parent     » topic index » view message » categorize

9. Re: landscape printing

On Sat, 27 Dec 2003 18:55:32 -0500, Bernie Ryan
<xotron at bluefrognet.net> wrote:

>I think you will have to use escape codes to switch the printer
>into the landscape mode.

Thanks Bernie. That's great if it's your own printer and you've got
the manual (which *IS* a signif, proport'n of readers here).
So yes, in some cases, that may be a better solution.

Pete

new topic     » goto parent     » topic index » view message » categorize

10. Re: landscape printing

On Sat, 27 Dec 2003 19:48:19 -0500, Euman <euman at bellsouth.net> wrote:

>hehehe
Now I'm scared. No, Seriously. I'm scared. Quite scared, anyway. blink

Pete

new topic     » goto parent     » topic index » view message » categorize

11. Re: landscape printing

----- Original Message ----- 
From: "Bernie Ryan" <xotron at bluefrognet.net>
To: <EUforum at topica.com>
Subject: RE: landscape printing


> 
> 
> I think you will have to use escape codes to switch the printer
> into the landscape mode. 

Isn't this why God created device drivers?

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

12. Re: landscape printing

----- Original Message ----- 
From: "Brian Broker" <bkb at cnw.com>
To: <EUforum at topica.com>
Subject: RE: landscape printing


> 
> 
>
> http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/aboutcommondialogboxes/pagesetupdialogbox.asp
> 
> 
> The Page Setup dialog box lets the user set the following attributes of 
> the printed page: 
> 
>  * The paper type (envelope, legal, letter, and so on) 
>  * The paper source (manual feed, tractor feed, sheet feeder, and so on) 
> 
>  * The page orientation (portrait or landscape) 
>  * The width of the page margins 
> 
> -- Brian

Yes, we all know this already. This is not news. The question though was how
does one code a program to place a printer into 'Landscape Mode' as opposed to
getting a User to respond to a dialog box.

It would appear that the program needs to set the appropriate data fields in the
DEVMODE structure and use this somehow. I haven't spent a lot of time on this
yet.

-- 
Derek

 
> Derek Parnell wrote:
> > 
> > 
> > ----- Original Message ----- 
> > From: "Bernie Ryan" <xotron at bluefrognet.net>
> > To: <EUforum at topica.com>
> > Sent: Sunday, December 28, 2003 10:55 AM
> > Subject: RE: landscape printing
> > 
> > 
> > > I think you will have to use escape codes to switch the printer
> > > into the landscape mode. 
> > 
> > Isn't this why God created device drivers?
> > 
> > -- 
> > Derek
> > 
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
>

new topic     » goto parent     » topic index » view message » categorize

13. Re: landscape printing

On Tue, 30 Dec 2003 08:43:54 +1100, Derek Parnell
<ddparnell at bigpond.com> wrote:

>
>
>----- Original Message ----- 
>From: "Brian Broker" <bkb at cnw.com>
>To: <EUforum at topica.com>
>Subject: RE: landscape printing
>
>
>>
>> http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/aboutcommondialogboxes/pagesetupdialogbox.asp
>> 
>> 
>> The Page Setup dialog box lets the user set the following attributes of 
>> the printed page: 
>> 
>>  * The paper type (envelope, legal, letter, and so on) 
>>  * The paper source (manual feed, tractor feed, sheet feeder, and so on) 
>> 
>>  * The page orientation (portrait or landscape) 
>>  * The width of the page margins 
>> 
>> -- Brian
>
>Yes, we all know this already. This is not news. The question though was how
>does one code a program to place a printer into 'Landscape Mode' as opposed to
>getting a User to respond to a dialog box.
>
>It would appear that the program needs to set the appropriate data fields in
>the DEVMODE structure and use this somehow. I haven't spent a lot of time on this
>yet.

I replied twice already (though I can't be sure the first got through
as my mailbox went belly up at the time). There's an example buried in
the support routine for my print preview and report generator, though
you may have to edit away some of the calls to my shrouded routines.
Maybe I wasn't clear on that point: the code needed is NOT shrouded.

See support.ew and the replacement win32prt.ew print routines.

Pete
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html

new topic     » goto parent     » topic index » view message » categorize

14. Re: landscape printing

On Mon, 29 Dec 2003 22:20:50 +0000, Brian Broker <bkb at cnw.com> wrote:

>I'd provide a demo if it wasn't such a pain to init and properly fill 
>these stuctures...  (you know... crashing your program 20 times before 
>getting it right; just to set one attribute.)
ain't that the truth!
>
>Maybe if I get really, really bored...
LOL

Pete
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu