Get Number Of Page That Printed By Printer?
Apr 25, 2012
How can i make a program that can get number of page that printed by special printer?
For example: my printer is HP 1015
i want check my printer by timer every time of period and when printer start to printing, get number of page that is printing...
View 1 Replies
ADVERTISEMENT
Aug 12, 2010
I have a network printer in the classroom lab. I'd like to keep record of how many pages of each student has printed. I want to know how can I read the printer pool to get the number of pages, when a student prints. Here's what I have in mind: Write a Windows service to get:
[Code]...
View 1 Replies
Nov 25, 2009
APIs for Printer Page number
View 2 Replies
Mar 4, 2010
I'm helping the IT department at my school do an audit of all our printers (there are hundreds). They are all networked, so I wrote a vb.net program that sends PJL (printer job language) commands over port 9100 to all the printers to retrieve the page count. @PJL INFO PAGECOUNT actually gets the page count for all the printers, but for color printers we also need to know the color / mono page counts (number of color pages printed, number of black and white pages printed).... the number being returned by the PAGECOUNT command right now seems to be the total pagecount on color printers, so if I can find a command that will give me either the mono or color page count, I'll have the other number. I also need the serial number of every machine (the spreadsheet I'm working off of is unreliable). @PJL INQUIRE SERIALNUMBER actually returns the serial number for about half of the HP printers, and some random non-HP ones, but I can't figure out a way to get the serial number for the other 50%. I sent emails to some of the people who wrote the articles about PJL I was following, and they advised I try using printer spooler functions (from my brief google search it would appear these are windows API's that facilitate communication with a printer).
Does anyone have any experience with working with the Printer Spooler functions or know a PJL command I might have overlooked that will help me get any of the info I'm looking for?here is my program right now. Ignore GetSerialNumber2 and GetSerialNumber3... they don't work (well actually GetSerialNumber2 works on 5 printers... but yea). GetSerialNumber() is the one that gets the serial number successfully for about half of the printers. (edit: I took out those functions in the version I posted, along with some other stuff that wasn't needed for this, to fit the post size limit)
View 2 Replies
Feb 22, 2012
I'm using Report Viewer(VS 2008) to make a report in VB.net. I add Table with Table Header, Table Detail, and Table Footer. Then insert a Table Group(table1_group1) and add expression =IntRowNumber Nothing-1/10 on that group. I check page breaks at end.
When I load the report its show normal :
page 1 : page header+ table header + table detail(10 list data) + page footer
page 2 : page header+ table header + table detail(5 list data) + table footer + page footer
But when I click Print Layout Icon its show an extra page(page 3):
page 1 : page header+ table header + table detail(10 list data) + page footer
page 2 : page header+ table header + table detail(5 list data) + page footer
page 3 : page header + table footer + page footer ( this is the error)
I also try to print the report and its print 3 page.
View 1 Replies
Feb 16, 2010
I am having a problem, my Printpreview is showing 2 pages, but only printing ONE.. Here is the code... PLEASE HELP.
Imports System.Drawing
Private Sub ChooseTerm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim bk As New dbase("termabsent")
[code]....
View 10 Replies
Sep 26, 2011
I am trying to print an image (from file) to a the printer using a PrintDocument.I am re-sizing my image so that it is scaled to be full page on the printout when I print this the image is cropped slightly.
EDIT 2:I am using the margins to calculate the area to use:
With printSettings.DefaultPageSettings
Dim areaWidth As Single = .Bounds.Width - .Margins.Left - .Margins.Right
Dim areaHeight As Single = .Bounds.Height - .Margins.Top - .Margins.Bottom
End With
The bounds of the page are 1169x827 (A4) and with the margins it is 1137x795.After resize my image size is 1092x682 and I am using the following code to draw it:
e.Graphics.DrawImage(printBitmap, .Margins.Left, .Margins.Top)
The annoying thing is that when I print to the PrintPreviewDialog it is scaled perfectly but when I print the exact same code to the actual printer it does not fit.
EDIT 3:Full code can be found at this url Usage:
Dim clsPrint As New clsPrinting
With clsPrint
.Landscape = True
[code]....
View 3 Replies
Apr 2, 2009
i want to write a program to get nuimber of pages printed from a specific printer. i spent a lot of time for googling and i finally managed to get acode that is posted in this link given below [URl]..the problem with above code is its getting no. of pages printed but not getting no. of copies printed for eg: if no. of pages to print is 2 and no. of copies is 3 the total no. of pages printed will be 6. but im gettin total pages printed is 2 ie no. of copies is not getting
View 5 Replies
Jul 13, 2011
i have this program which records the every printing made on a local computer.I am to record the number of pages of the document to be printed and the number of printed pages. i have this code but i don't know the number of pages and number printed pages always return 0 [Code].
View 1 Replies
Apr 26, 2010
I created a button instead of the print button in crystal report because i need to record the report printed report serial number, date and time to the database. when i click on the button, dialog box appear. if i click on the ok button , system record the printed report details to the database and report printed successfully. but when i click on the cancel button , system again recording the printed report record.
[Code]...
View 8 Replies
Aug 3, 2010
I am continuing a previous thread to keep it from becoming tooooooo long. I tried most of the helpful suggestions offered by kind forum contributors but can't seem to make them work. I tried to analyze somewhat but it's beyond my skill level. So a different approach was to try to incorporate the code in the PrintDocument1_PrintPage event of my application that prints acceptably, but only prints first page of multi page document. I had three somewhat different approaches offered by John Anthony Oliver, ACAMAR, and Crazy Pennie. I cut the code and placed in the PrintDocument1_PrintPage event code. All three approaches made the "Printing"message box page counter go wild without outputing to my printer. Family Man Mike suggested resetting the variables after the e.HasMorePages=false line. I tried that approach but couldn't make that work for me, I really don't comprehend but made an attempt such as num_of_pages = 0, startVal = 0, endVal = 0. That had no affect on the functionality.
Public Sub DrawStringRectangleFormat _
(ByVal stringToDraw As String, _
ByVal stringFont As Font, _
ByVal stringFrmt As StringFormat, _
[code].....
View 1 Replies
May 24, 2011
I've checked through most of the nfo I can find in forums about scaling a picture, but still haven't stumbled over the answer. ALl I want to do is print my form on the printer. The problem is I don't know what monitor the form is being dispayed on and how big or small the user has madt it. I just want it to fit on the printer when it is printed. Basically I want it to, "Fit the Page".
I thought I could do it by using a rectangle and adjusting the size of the rectangle to fit the 8.5 x 11 paper, All this seems to do is magnify my form on the printed page and clips the sides and bottom of the form instead of making it "fit" on the page. What am I doing wrong?
Here is what I am using: Public MyForm As New Bitmap(Me.Width, Me.Height) Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click
[Code]...
View 4 Replies
Jan 24, 2010
I have a form that uses the printer object and the print preview. A user clicks on a Print button, the preview comes up. This works fine the first time they do so, but if they click on this button more times, the output is overlaid ontop of the first report. The printer object is destroyed at the end of the print creation, and I have tried various other means to make sure that the page gets cleared without success.[code]
View 20 Replies
Feb 4, 2010
I have a web page and a button inside, how can i print the page when i click on the print button without showing the printer dialog?
View 1 Replies
Dec 23, 2010
I want to find the remaining number of prints left on the printer. I use a Sony UP-CX1 dye sub printer. If I go to Printer Properties>Preferences it tells me the remaining prints and also the total prints on the current thermal head. How can I tap into this information with vb.net?
View 1 Replies
Dec 22, 2010
Some printers aren't actually printers e.g. CutePDF, PDF995 etc are printer drivers that "print" PDF files, and the built in fax support for Windows is through a printer driver that "prints" to the fax modem.
Both PDF and fax need a little bit more information than a normal print job - PDF needs a filename, Fax needs a phone number. Usually there is a pop-up dialog that prompts the user for the extra information.
Is there any way to set this information programmatically?
There is a property Printing.PrintDocument.PrinterSettings.PrintFileName but this only seems to work when Printing.PrintDocument.PrinterSettings.PrintToFile is set to TRUE, which is not the case in these situations (even though a PDF printer writes a file, it is not "save print job to file" in the normal sense).
View 1 Replies
Apr 30, 2011
I'm having issues with e.HasMorePages.. I've written a function that will plot long texts onto the printer and should insert a new page everytime yPos > PrintHeight
e.g.
Module Scope var i is the count
PrintPage
if i<=10
[CODE]...
I can certainly add pages from the printpage, but my function will plot characters individually onto the printer and will increase ypos at the end of the printers width.
View 10 Replies
Feb 24, 2009
I want to print an array WebBrowser each time to a different printer without changing the default Printer (not to use the SetDefaultPrinter function) I tried to work with the PrintDocument object(he have the Print function and also i can choose a printer name) but I cant attach the
[Code]...
View 1 Replies
Apr 21, 2010
i m using this this coding to copy and print the word document
System.IO.File.Copy(Application.StartupPath &"PrintT.doc", Application.StartupPath & "PrintT1.doc", True)
Dim line1 As String
Dim line2 As String
line1 = "Line1 Replace"
line2 = "Line2 Replace"
[Code]...
now i need to print the Word Document with Printer Default Font(Draft 17.5 CPI) in Dot Matricx Printer
View 2 Replies
Jul 2, 2010
For my current application development I need direct printing technique,For the purpose I refer Microsoft Support page Titled"How to send raw data to a printer using VB.Net "The code snippnet specified is perfect for my application.Refers link [URL]But I need something more like Setting the Printer font to Condensed.By default my printer use the font 10cpi ,by using this font size I limited to print only 80char on A4 sheet,but I have more than 80 char on line so I prefer Condensed font size.
View 2 Replies
Dec 7, 2009
get a list of printer's (name,port,model) from a computer over the network. I know how to list my own, but it's from querying the Win32_printer object on my machine, I need to be able to do something similar on a remote machine.
View 4 Replies
Sep 3, 2009
I'm trying to check the printer status of a shared printer on a Win98 platform pc and need some samples to get started.
View 3 Replies
Jun 1, 2010
I am trying to get the page number (may be in a form or array) from the PDF file that contains certain search text. for e.g. if user search for "VBforums" and if this word is present in 4,5,8th page in PDF file than output should be "4,5,8"
right now i am planning to split each page of PDF file as new PDF file (file name will be PageNo.PDF) and than convert it into .txt format and search the word in each individual .txt file.
View 9 Replies
Feb 22, 2011
I have printer vendor provided SDK implementing that i can get printer DEVMODE or HDC with correct printer settings.
My questions is:
I am already using printDocument to print the image (System.Drawing.Bitmap). How can send use this HDC or DEVMOD with printDocument.
I already tried using the "PrintDocument.SetDevMode". it seems not be working.
View 3 Replies
Mar 18, 2011
1. Detect if my printer is busy, because my code tells the printer to print more pages that it can cope with, so I need to delay the command for 'Print the next page' until the printer has finished printing the previous one.
2. Shift the output to my printer so that it gets printed in it's entirety on the paper, instead of seemingly being anchored to some nebulous point on the A4 page. It starts printing at X = 29mm from the left edge, and Y is 28mm from the top, and stops at X = 22mm from the right edge and Y stops at 22mm from the bottom edge, leaving (aprox) 50mm of X and 50mm of Y unprinted.
3. Get useful information on Bounds, which I'm fairly certain is what I need to control where my printing should start and finish.
I've hunted through this forum, MSDN, 'Help' (a misnomer if ever there was one) the VB Library and one or two other forums, which either baffle me with reams of code or suggest code to try which either just don't work or which doesn't declare all the variables and usually don't suggest what type of variable I need, it's all very frustrating
View 9 Replies
Feb 14, 2011
Our company has an old intranet site, that has 1000's of pages, and ive created a loop to look at them all, but i wanted a way to put all the phone numbers it can find, into a text box, i have the code below but cant seem to get it to work.
Sometimes the phone numbers can be 111-222-3333 (111)-222-3333 111 222 3333
'Reg exp for phone number
Dim myMatch As Match = System.Text.RegularExpressions.Regex.Match(My_Text, "^([2-9]{3}-)?[2-9]{3}-d{4}$")
[Code]....
View 9 Replies
Feb 27, 2009
I have gridview that I am using paging on. I want to pass along the current page in a asp:Hyperlink so I can send them back to the current page when they are done viewing the details of a record. Is this possible? If it is how can I do this?
<asp:GridView ID="grdObitList" runat="server" allowpaging="true"
PageSize="10" AutoGenerateColumns="false" CssClass="grdClass"
BorderStyle="None" GridLines="None" CellSpacing="2" >
[Code]....
View 1 Replies
Jun 25, 2012
I'm having a problem in MS Word interop. I'm using VC++, but I'll accept suggestions in C# as well. In a word document having a page number given in the footer when I use the SaveAs method I am getting a random page number instead of the correct
[Code]...
View 2 Replies
May 18, 2012
I'm having a problem in MS Word interop. I'm using VC++, but I'll accept suggestions in C# as well.In a word document having a page number given in the footer when I use the SaveAsmethod I am getting a random page number instead of the corre also tried using PageNumbers.GetStartNumber and Range.GetInformation methods with no luck.
View 2 Replies
May 27, 2011
I am rendering an rdlc report to the client directly, tried adding the page number using the code below in the footer
=Globals.PageNumber & " of " & Globals.TotalPages
I am getting #Error when the report is rendered as pdf on the client. Need assitance to resolve the error.
View 2 Replies