?
Solved

how to give the NumberOfCopies to the WinSpool function StartPagePrint function

Posted on 2008-10-23
2
Medium Priority
?
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Expert Comment

by:SameerJagdale
ID: 22785876
0
 

Accepted Solution

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

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

Featured Post

Python: Series & Data Frames With Pandas

Learn the basics of Python’s pandas library of series & data frames and how we can use these tools for data manipulation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

800 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