Two-side printing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Two-side printing

Plumber
Hi !
I am trying to print on Canon Image Runner 550 using both sides of
paper. I try this:

printer := PronterCanvas choose. "I go to properties and choose
double-sided here"
printer startDoc.
printer startPage.
page1 printOn: printer.
printer endPage.
printer startPage.
page1 printOn: printer.
printer endDoc.

This code prints two separate pages... Please help !

-Alex


Reply | Threaded
Open this post in threaded view
|

Re: Two-side printing

Ian Bartholomew-18
Alex,

> I am trying to print on Canon Image Runner 550 using both sides of
> paper. I try this:
[]
> This code prints two separate pages... Please help !

Can't help with the Canon but I just tried the code below (your code had a
couple of typos?) on an HP940 and it worked as normal. It printed the first
page and then I got the prompt asking me to turn the pages over.

printer := PrinterCanvas choose.
page1 := 'this is page 1'.
page2 := 'this is page2'.
printer startDoc.
printer startPage.
printer text: page1 at: 100@100.
printer endPage.
printer startPage.
printer text: page2 at: 100@100.
printer endPage.
printer endDoc.

One possibility that might help is to give the document a name.  This is a
bit of a long shot but it has cured some obscure printer related problems in
the past.  Add the following method

PrinterCanvas>>startDocNamed: aString
    GDILibrary default startDoc: self asParameter
        lpdi: ((DOCINFO new)
            lpszDocName: aString;
            yourself)

and change the #startDoc line in the above code to

printer startDocNamed: 'anything'

You never know...

Regards
    Ian


Reply | Threaded
Open this post in threaded view
|

Re: Two-side printing

Plumber
Yan,

Thank you very much, somehow it worked.

Ian Bartholomew wrote:

> Alex,
>
> > I am trying to print on Canon Image Runner 550 using both sides of
> > paper. I try this:
> []
> > This code prints two separate pages... Please help !
>
> Can't help with the Canon but I just tried the code below (your code had a
> couple of typos?) on an HP940 and it worked as normal. It printed the first
> page and then I got the prompt asking me to turn the pages over.
>
> printer := PrinterCanvas choose.
> page1 := 'this is page 1'.
> page2 := 'this is page2'.
> printer startDoc.
> printer startPage.
> printer text: page1 at: 100@100.
> printer endPage.
> printer startPage.
> printer text: page2 at: 100@100.
> printer endPage.
> printer endDoc.
>
> One possibility that might help is to give the document a name.  This is a
> bit of a long shot but it has cured some obscure printer related problems in
> the past.  Add the following method
>
> PrinterCanvas>>startDocNamed: aString
>     GDILibrary default startDoc: self asParameter
>         lpdi: ((DOCINFO new)
>             lpszDocName: aString;
>             yourself)
>
> and change the #startDoc line in the above code to
>
> printer startDocNamed: 'anything'
>
> You never know...
>
> Regards
>     Ian