C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

VSPrinter Duplex

rated by 0 users
This post has 6 Replies | 1 Follower

Not Ranked
Posts 4
nikhorva Posted: Thu, Apr 2 2009 10:56 AM

Hi!

I´m using VB6 and VSPrinter 8.0 and I´m trying to print two pages on the same paper (Duplex). While printing, printer say´s "Printing in duplex ..." but it print´s pages on two papers, every page on the other paper, not in duplex.

Printer ih HP LaserJet 4600.

 

Code example:

                        VSpr.Duplex = 2
                        VSpr.PrintDoc , 1, 1
                        VSpr.NewPage
                        VSpr.PrintDoc , 2, 2

Top 10 Contributor
Posts 1,237

Hello,

 

In order to narrow the issue I would request you to let me know that the printer that you are using also supports the Duplex feature.

 

Looking forward to hear from you.

 

Have a nice day.

 

Regards,

Patrick Simpson

<nikhorva> wrote in message news:216140@10.0.1.98...

Hi!

I´m using VB6 and VSPrinter 8.0 and I´m trying to print two pages on the same paper (Duplex). While printing, printer say´s "Printing in duplex ..." but it print´s pages on two papers, every page on the other paper, not in duplex.

Printer ih HP LaserJet 4600.

 

Code example:

                        VSpr.Duplex = 2
                        VSpr.PrintDoc , 1, 1
                        VSpr.NewPage
                        VSpr.PrintDoc , 2, 2



http://helpcentral.componentone.com/cs/forums/p/78743/216140.aspx#216140

Not Ranked
Posts 4

 Hi!

Thank You for answering!

Yes, this printer supports the Duplex feature. When I´m using standard printer component (not VSPrinter but Printer that comes with VB6) then duplex works.

Here is the code example that I´m using with standard printer:
    Printer.Duplex = 2
    Printer.Print "Text on first page"
    Printer.NewPage
    Printer.Print "Text on second page"

Regards,

Nikola

 

C1_PatrickS:

Hello,

 

In order to narrow the issue I would request you to let me know that the printer that you are using also supports the Duplex feature.

 

Looking forward to hear from you.

 

Have a nice day.

 

Regards,

Patrick Simpson

<nikhorva> wrote in message news:216140@10.0.1.98...

Hi!

I´m using VB6 and VSPrinter 8.0 and I´m trying to print two pages on the same paper (Duplex). While printing, printer say´s "Printing in duplex ..." but it print´s pages on two papers, every page on the other paper, not in duplex.

Printer ih HP LaserJet 4600.

 

Code example:

                        VSpr.Duplex = 2
                        VSpr.PrintDoc , 1, 1
                        VSpr.NewPage
                        VSpr.PrintDoc , 2, 2



http://helpcentral.componentone.com/cs/forums/p/78743/216140.aspx#216140

Top 10 Contributor
Posts 1,237

Hello,

 

Well I have used the following code in my sample project and used the Duplex supported printer.

 

Code:

 

Private Sub Form_Load()

 

With VSPrinter1

.StartDoc

.Duplex = dupVertical

.FontSize = 50

.Text = "test on page 1"

.NewPage

.Text = "this is a test on page 2"

.EndDoc

End With

 

End Sub

 

The above code worked fine at my end and I am able to generate the printout on a single page. I am still not able to replicate the issue on my end.

 

I am using the latest build of the control. You can download the latest build from the link mentioned below:

 

http://prerelease.componentone.com/activex/VSView/2008-T3/view8_8.0.20083.148.zip

 

I hope this helps.

 

Have a nice day.

 

Regards,

Patrick

<nikhorva> wrote in message news:216220@10.0.1.98...

 Hi!

Thank You for answering!

Yes, this printer supports the Duplex feature. When I´m using standard printer component (not VSPrinter but Printer that comes with VB6) then duplex works.

Here is the code example that I´m using with standard printer:
    Printer.Duplex = 2
    Printer.Print "Text on first page"
    Printer.NewPage
    Printer.Print "Text on second page"

Regards,

Nikola

 

C1_PatrickS:

Hello,

 

In order to narrow the issue I would request you to let me know that the printer that you are using also supports the Duplex feature.

 

Looking forward to hear from you.

 

Have a nice day.

 

Regards,

Patrick Simpson

<nikhorva> wrote in message news:216140@10.0.1.98...

Hi!

I´m using VB6 and VSPrinter 8.0 and I´m trying to print two pages on the same paper (Duplex). While printing, printer say´s "Printing in duplex ..." but it print´s pages on two papers, every page on the other paper, not in duplex.

Printer ih HP LaserJet 4600.

 

Code example:

                        VSpr.Duplex = 2
                        VSpr.PrintDoc , 1, 1
                        VSpr.NewPage
                        VSpr.PrintDoc , 2, 2



http://helpcentral.componentone.com/cs/forums/p/78743/216140.aspx#216140



http://helpcentral.componentone.com/cs/forums/p/78743/216220.aspx#216220

Not Ranked
Posts 4
nikhorva replied on Wed, Apr 15 2009 6:27 AM

Hello,

Thanks for sample.

This sample works on my end too, but when I´m using VSPrinter1.PrintDoc instead of VSPrinter1.Text then duplex doesn´t work.

 

Regards,

Nikola

 

 

C1_PatrickS:

Hello,

 

Well I have used the following code in my sample project and used the Duplex supported printer.

 

Code:

 

Private Sub Form_Load()

 

With VSPrinter1

.StartDoc

.Duplex = dupVertical

.FontSize = 50

.Text = "test on page 1"

.NewPage

.Text = "this is a test on page 2"

.EndDoc

End With

 

End Sub

 

The above code worked fine at my end and I am able to generate the printout on a single page. I am still not able to replicate the issue on my end.

 

I am using the latest build of the control. You can download the latest build from the link mentioned below:

 

http://prerelease.componentone.com/activex/VSView/2008-T3/view8_8.0.20083.148.zip

 

I hope this helps.

 

Have a nice day.

 

Regards,

Patrick

<nikhorva> wrote in message news:216220@10.0.1.98...

 Hi!

Thank You for answering!

Yes, this printer supports the Duplex feature. When I´m using standard printer component (not VSPrinter but Printer that comes with VB6) then duplex works.

Here is the code example that I´m using with standard printer:
    Printer.Duplex = 2
    Printer.Print "Text on first page"
    Printer.NewPage
    Printer.Print "Text on second page"

Regards,

Nikola

 

 

C1_PatrickS:

 

Hello,

 

In order to narrow the issue I would request you to let me know that the printer that you are using also supports the Duplex feature.

 

Looking forward to hear from you.

 

Have a nice day.

 

Regards,

Patrick Simpson

<nikhorva> wrote in message news:216140@10.0.1.98...

Hi!

I´m using VB6 and VSPrinter 8.0 and I´m trying to print two pages on the same paper (Duplex). While printing, printer say´s "Printing in duplex ..." but it print´s pages on two papers, every page on the other paper, not in duplex.

Printer ih HP LaserJet 4600.

 

Code example:

                        VSpr.Duplex = 2
                        VSpr.PrintDoc , 1, 1
                        VSpr.NewPage
                        VSpr.PrintDoc , 2, 2



http://helpcentral.componentone.com/cs/forums/p/78743/216140.aspx#216140



http://helpcentral.componentone.com/cs/forums/p/78743/216220.aspx#216220

 
Top 10 Contributor
Posts 1,237

Hello,

 

I tried to use the PrintDoc as well in the code and I was able to get the duplex working.

 

I used the below mentioned code:

 

Private Sub Form_Load()

 

With VSPrinter1

        ..StartDoc

        .Duplex = dupVertical

        ..FontSize = 50

        .Text = "This is test"

        ..NewPage

        .Text = "this is second test"

        ..EndDoc

End With

 

    Me.VSPrinter1.PrintDoc True, "1", "2"

 

End Sub

 

I have used Printer.Text as I need to render some text on the view at the time to print.

 

Please feel free to share your observation on the same.

 

Have a nice day.

 

Regards,         

Patrick

<nikhorva> wrote in message news:216573@10.0.1.98...

Hello,

Thanks for sample.

This sample works on my end too, but when I´m using VSPrinter1.PrintDoc instead of VSPrinter1.Text then duplex doesn´t work.

 

Regards,

Nikola

 

 

C1_PatrickS:

Hello,

 

Well I have used the following code in my sample project and used the Duplex supported printer.

 

Code:

 

Private Sub Form_Load()

 

With VSPrinter1

.StartDoc

.Duplex = dupVertical

.FontSize = 50

.Text = "test on page 1"

.NewPage

.Text = "this is a test on page 2"

.EndDoc

End With

 

End Sub

 

The above code worked fine at my end and I am able to generate the printout on a single page. I am still not able to replicate the issue on my end.

 

I am using the latest build of the control. You can download the latest build from the link mentioned below:

 

http://prerelease.componentone.com/activex/VSView/2008-T3/view8_8.0.20083.148.zip

 

I hope this helps.

 

Have a nice day.

 

Regards,

Patrick

<nikhorva> wrote in message news:216220@10.0.1.98...

 Hi!

Thank You for answering!

Yes, this printer supports the Duplex feature. When I´m using standard printer component (not VSPrinter but Printer that comes with VB6) then duplex works.

Here is the code example that I´m using with standard printer:
    Printer.Duplex = 2
    Printer.Print "Text on first page"
    Printer.NewPage
    Printer.Print "Text on second page"

Regards,

Nikola

 

 

C1_PatrickS:

 

Hello,

 

In order to narrow the issue I would request you to let me know that the printer that you are using also supports the Duplex feature.

 

Looking forward to hear from you.

 

Have a nice day.

 

Regards,

Patrick Simpson

<nikhorva> wrote in message news:216140@10.0.1.98...

Hi!

I´m using VB6 and VSPrinter 8.0 and I´m trying to print two pages on the same paper (Duplex). While printing, printer say´s "Printing in duplex ..." but it print´s pages on two papers, every page on the other paper, not in duplex.

Printer ih HP LaserJet 4600.

 

Code example:

                        VSpr.Duplex = 2
                        VSpr.PrintDoc , 1, 1
                        VSpr.NewPage
                        VSpr.PrintDoc , 2, 2



http://helpcentral.componentone.com/cs/forums/p/78743/216140.aspx#216140



http://helpcentral.componentone.com/cs/forums/p/78743/216220.aspx#216220

 

http://helpcentral.componentone.com/cs/forums/p/78743/216573.aspx#216573

Not Ranked
Posts 4
nikhorva replied on Thu, Apr 23 2009 10:18 AM

Hello,

Thank you again for the example. This time I understand what my problem was. I was setting the Duplex setting before PrintDoc, when the document I was printing was already created in preview window and this is why it didn´t work.

So, solution is to set the Duplex setting before document is created for preview.

 

Thank you one more time for the help!

 

Regards,

Nikola

 

 

C1_PatrickS:

Hello,

 

I tried to use the PrintDoc as well in the code and I was able to get the duplex working.

 

I used the below mentioned code:

 

Private Sub Form_Load()

 

With VSPrinter1

        ..StartDoc

        .Duplex = dupVertical

        ..FontSize = 50

        .Text = "This is test"

        ..NewPage

        .Text = "this is second test"

        ..EndDoc

End With

 

    Me.VSPrinter1.PrintDoc True, "1", "2"

 

End Sub

 

I have used Printer.Text as I need to render some text on the view at the time to print.

 

Please feel free to share your observation on the same.

 

Have a nice day.

 

Regards,         

Patrick

Page 1 of 1 (7 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.