Solved

how to give the NumberOfCopies to the WinSpool function StartPagePrint function

Posted on 2008-10-23
2
236 Views
Last Modified: 2008-10-28
Question:
I use the class RawPrinterHelper from microsoft support(see http://support.microsoft.com/kb/322091). I added one more parameter "Copies" to function:
Public Shared Function SendFileToPrinter(ByVal szPrinterName As String, ByVal szFileName As String, ByVal Copies As Integer) As Boolean, changed:bSuccess = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, fs.Length) to :
Dim i As Integer
For i = 1 To Copies
    bSuccess = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, fs.Length)
Next

But if the copies is big number(999), print spool service gets errors. I know it is not a good way to tell the printer how many copies to print by sending multiple times for the same data. I wonder if we can set the copies in StartPagePrint or what is the best to tell the functions the number of copies.
0
Comment
Question by:smurri
2 Comments
 
LVL 13

Expert Comment

by:SameerJagdale
Comment Utility
0
 

Accepted Solution

by:
smurri earned 0 total points
Comment Utility
The proposed way does not work for us.

We will use the printer commands for the printer and connect directly.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now