Click here to Skip to main content
15,886,815 members
Everything / General Programming / Printing

Printing

printing

Great Reads

by Vahid_N
PdfReport is a code-first reporting engine which is built on top of the iTextSharp and EPPlus libraries.
by OriginalGriff
How to print labels in Word
by EFEaglehouse
Windows CE/Mobile printing client for LPR, LPRng, and Socket API.
by OriginalGriff
OK, OK. I had to set it up - Herself insisted - and I had to actually print to be sure. So I knocked up a quick box to print (just to show I could).

Latest Articles

by OriginalGriff
How to print labels in Word
by OriginalGriff
I'm getting a 3D printer for Christmas! So - I need to learn to use it. That means ... a CAD package. Gulp.
by OriginalGriff
So ... you want to put that LCD display in there, huh? Pity it's not a rectangular frame, isn't it? How are you going to fit a neat frame round that, huh? It's complicated, but ... not that complicated when you get used to it.
by OriginalGriff
OK, OK. I had to set it up - Herself insisted - and I had to actually print to be sure. So I knocked up a quick box to print (just to show I could).

All Articles

Sort by Updated

Printing 

24 Nov 2010 by #realJSOP
Wow. Color me surprised when I found out that searching google for "vb.net printing" resulted in over 900 THOUSAND hits. Imean - really - WOW!
27 Dec 2010 by #realJSOP
Most printers nowadays come with software/drivers that will report that kind of thing. If they don't come with that kind of software, there probably isn't a way to determine that status. You could always contact the manufacturer and see if they have a SDK available, but I wouldn't expect...
11 Jan 2011 by #realJSOP
You can probably get the status using WMI. Google is your friend.
17 Jun 2018 by #realJSOP
Google is your friend: Google - c# add watermark to printed page[^]
30 Sep 2019 by #realJSOP
The (service?) account unhder which your web app runs does not have access to the printers. Bigger question - Why would you want a web app to access printers? That seems to be ripe for abuse.
9 Dec 2021 by #realJSOP
I found this codeproject article. I don't know if it's going to help you, but... Be aware that there are some issues with the code, but messages for the article describe fixes. Implement a basic IP Scanner for a local LAN in C#[^]
26 Mar 2011 by 555336
Well, I have a textbox and a print button. I want when a user will click on the print button, the pagesetup appears to print the textbox details according to the user.What is the code to do this?
24 Nov 2014 by _Damian S_
If they all live in the same directory, you could write yourself a little program that opens the first file it finds in a directory, prints it, then moves the file to a "completed" folder (or deletes it if not required), continuing sending one file per minute/five minutes/hour/whatever time...
17 Mar 2011 by _Maxxx_
Well you can build a string containing escape sequences - if you know the number of the character your printer recognises using\unnnnwhere nnnn is the four digit hexadecimal value of the escape characterSo you may be able to just build that into the string you are printing.
22 Apr 2012 by A.Rahman Seyam
Greetings everybody,I'm trying to install a network printer using an administrator user but I'm getting the error message (Operation couldn't be completed error 0x00000032), when I searched for this error message I found that it means that the user is not authenticated to install the printer...
4 May 2012 by A.Rahman Seyam
I found the solution of my problem by creating a user account on the NAS storage with the same account name and password of my domain user, also joining the NAS storage to the domain would work.Thanks
29 Aug 2012 by Aarti Meswania
check your printer's / page's property is there any option available,Source Document if it is then set it to [Feed,cut]I have used Epson printer & notepad doc.you can refer below link,http://www.bigresource.com/VB-Change-Notepad-settings-from-VB-6-0-BcReZa4RRZ.html#slugrMccW9[^]
4 Sep 2012 by Aarti Meswania
> open notepad doc copy paste below textReport Header Section Bill no : 101______________________________________________Detail SectionItem Code Qty Amount[ItemCode] [Qty] ...
6 May 2013 by Aarti Meswania
You should set papername custom and then set paper's Height & widthHappy Coding!:)
4 Dec 2013 by abbaspirmoradi
this is not good idea my friend.just read this article.it have a method that you give your datagridview to this method and it print all column you want(Print_DataGridView).try this:DataGridView Printing by Selecting Columns and Rows[^]
13 Dec 2017 by Abdulateef
ReportParameterCollection reportparameter = new ReportParameterCollection(); reportparameter.Add(new ReportParameter("productType", Globalvariables.username.ToString())); reportparameter.Add(new ReportParameter("customername", Globalvariables.username.ToString())); ...
26 Dec 2016 by Abhilash.J.A
Hello,I have a list of image from database with imagename and imagepath.How can I print each image through showing Print Dialog ?Please help me...What I have tried:if (objTble_Documents.Count() != 0) { PrintDocument pd = new PrintDocument(); ...
20 Jan 2017 by Abhilash.J.A
Hello everyone,I am using listview with list of images. By click listview row then getting all selected images and want to print those images. I have tried. After click,PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(PrintPage); ...
3 Dec 2010 by Abhinav S
You can try going through this[^] or this[^] article.
4 Feb 2011 by Abhinav S
You might want to use a third party control like this[^] to monitor the printer queue.
27 Mar 2011 by Abhinav S
This[^] could help you out as a starting guide.
1 Apr 2012 by Abhinav S
Maybe you are referring to some article you read on the internet.In this case, please provide a reference to the article so that someone can help you.There are a couple of articles on printing a grid view that could be of some assistance in helping you solve this problem.Printing a...
13 Jun 2012 by Abhinav S
Someone of the solutions described here[^] might help you out. Note that these are all workarounds to the original problem.
25 Nov 2013 by Abhinav S
Solutions on this thread[^] might help you develop a small script that can help you change printer settings.
3 Nov 2012 by Abhishek Pant
This may help you to use print dialog and access the printing here[^]And for button apply action you can use runtime events control of button here is a sample here[^]for hiding buttons and showing them you can apply show and hide property of buttons.I hope it helps you a bit
14 Jan 2013 by Abhishek Pant
Printing a GridView with Paging[^]Printing GridView from ASp.net[^]Changing Page Style for Printing[^]Printing a DataGridView on DotNet Framework[^]How to print multiple gridviews, each grid will be on separate pages.[^]How to print the Records from Gridview[^]Print gridview...
1 Oct 2012 by adesusan
I have build some project about transaction in a hospital...but i don't know how to build the result of the bill transaction.the result contain like this: NANY HOSPITAL= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ...
22 Sep 2013 by adesusan
The answer is print the panel of form using this code:void PrintImage(object o, PrintPageEventArgs e) { Bitmap img = new Bitmap(panel3.Width, panel3.Height); InvertZOrderOfControls(panel3.Controls); panel3.DrawToBitmap(img, new Rectangle(new...
25 Jan 2013 by Aditya Magotra
Hi,Can anyone please let me know how to print text on fixed location of page in asp.net.e.g. Similar to invoice like receipt Name is already present on the receipt, when user enter its name in the textbox in website & hit print button from application its name should print on the receipt...
20 Nov 2014 by Afzaal Ahmad Zeeshan
You would have to use the client-side programming to print a web page document. If you want to use the JavaScript, then this would work for you, // show the print dialog boxwindow.print();The document in a web page form is already present on the client's system. Once this code...
20 Nov 2016 by Afzaal Ahmad Zeeshan
Good question, :-)The fact is that this program allows you to strip out the file name from the command, then what it reads is the input that you pass to it, man page for lpr[^], reads as, Quote:If no names appear, the standard input is assumed.Input can be the bytes that you want to...
30 May 2010 by Agrafena
Good day! I have a problem with printing image. How I must fill this function?WriteFile(serial_port, (void *)argv[1], file_name_size, &bytes_written, NULL); Please give me an example.
31 May 2010 by Agrafena
I'm sorry, but there are not full answer. How can I create a Bitmap object(black/white)-by CreateCompatibleBitmap function? But how I can sent it to print?
13 Sep 2014 by Ahmad_kelany
Hi everybodyi have a zebra LP 2824 Plus printeri have developed a business application in VB.Net in which what i need to do is :programmaticaly send item name and a barcode of its id to be printed directly to the printerit has been a week now i am searching the weball i got was...
1 Feb 2019 by ahmed_sa
Problem How to prevent print when display data Exist on datatable using printpreview dialog and print document ? ? I work on csharp app working on visual studio 2015 . I have data on datatable and show this data exist on datatable when click print button but problem it print when click...
24 Dec 2018 by AhmedYehiaK
Hi everyone I have a report viewer that programmatically display a rdlc report when user click a buttonin button event i do the following: System.Drawing.Printing.PageSettings pg = new System.Drawing.Printing.PageSettings(); pg.Landscape = true; pg.Margins.Top = 2;...
23 Apr 2012 by ailing301
My driver is a virtual printer driver.It used a device managed surface andimplemented DrvCopyBits and other painting functions.Here ,The DrvCopyBitsneeds to be paid attention..The DrvCopyBits function have six intake parameters,thereinto,The fifthsparameter prclDest, the destination...
6 Sep 2014 by Aitizaz Khan
I have googled alot for the past few days to find an answer but i am unable to find anything.Problem Statement:I want to save a .prn file for each print job without prompting the user. but my problem is not restricted to a particular printer. I want to capture the .prn file for each file...
8 Sep 2014 by Aitizaz Khan
I have been searching for an answer for a month now but i am unable to find the exact solution or a method or from where to start.I want to create an application that logs the data printed. for example if I print "abcd" from notepad I want to capture this "abcd" from my software.I want...
16 Sep 2014 by Aitizaz Khan
Hi,I just want to know how can i decode the windows spooler .spl file to get the text i just printed.I know i have to do some kind of decoding but i need a little help from where to start. I am using USB POS Receipt printersThanks
22 Oct 2013 by Ajay J Singh
hi, i have developed crystal report for the password printing. in my report i have to print the password but it should not visible while displaying in viewer but get printed on page.for this we changed the forecolor of password field to white but while printing it is not printing on...
22 Jan 2016 by Akash Fasara
string strPrintFile = "D:\\Application2.pdf"; ConvertImageToPdf(arrayFile, strPrintFile); ProcessStartInfo info = new ProcessStartInfo(strPrintFile); info.Verb = "Print"; info.CreateNoWindow = true; info.WindowStyle...
4 Nov 2012 by Akinmade Bond
Print, Cancel, Apply? I don't even have that on my PrintDialog.But maybe this articlel on hacking FontDialog can get you started. But I strongly suggest you create your own PrintDialog[^]
13 Jul 2011 by Alberto Venditti
How to avoid the Print dialog while printing from Silverlight.
15 Feb 2011 by Albin Abel
Hi Create a Generic text printer in the pc (Add new Printer...or google it how to add a generic text printer)Look at this article how to send raw data to printer.http://support.microsoft.com/kb/322090[^]using this you can send ESC/POS commands to the printer.For ESC/POS commands...
17 Mar 2011 by Albin Abel
Similar discussion here. May help you to get some idea.Print and send commands to receipt printer[^]
3 Jan 2013 by Alexandre Bencz
Hi :)I have a folder with 10 pdfs, and, I whant to know how I can print this 10 pdfs without show the printdialog, for all pdfs, something like this:public void PrintAllDocuments() { string[] AllFiles = Directory.GetFiles(@"C:\PDF\", "*.pdf",...
3 Jan 2013 by Alexandre Bencz
I have 3 printers, and, I whant to print a lot of files, so, I whant to know, how I can make a little and simple system to manage this printers, the base I know, but, I whant to know, How I can make the printer print and continue with verification to put more files to print in another printer......
7 Feb 2013 by Alexandre Bencz
It's possible to install a device on the fly ???I say device, a printer..., I have the driver, and all things, I just whant to install the device, and, when I close the program, I whant to remove the device.Use C# or C/C++ ...It's possible ? if yes, How I can make this ?
14 Feb 2013 by Alexandre Bencz
I need to get the HP printer status, I have written this code:using System;using System.Collections;using System.Linq;using System.Management;using System.Text;namespace PrinterStatus{ class Program { private static int asd; private static string[]...
28 Jan 2014 by Alexandre Bencz
How I can send a PCL file to printer in C++ ?I have installed in my machine 5 printers, I want to choice the printer and send the PCL to that printer...I can send the PCL file to printer by hand, but, I need to share the printer and send the file using a COPY command of dos.I want to...
2 Jun 2014 by Alexandre Bencz
I found this http://support.microsoft.com/kb/322091[^] class in microsoft suport, explaining how to send a raw data to printer... but, when I try to use this to print in virtual PDF printer, not work. I tested wth foxit pdf printer and pdf creator.. I made some changes in the code, as...
20 Mar 2023 by Alexandre Bencz
Hi :)I'm doing some work with HTML and I want to print (on paper) these HTML files, in reality, the file does not exist, everything is saved in a string, all text in HTML, but I would like to print, already formatted...for example:using System;using...
2 Dec 2014 by AlexisGreen
There exists specialized software that manages bulk printing. It is called Print Conductor. Here http://www.print-conductor.com/articles/bulk-printing-software.html is the description of its functionality, and they mention API. It is simple, but has all that is needed.
31 May 2014 by AlwaysLearningNewStuff
INTRODUCTION AND RELEVANT INFORMATION:I am maintaining an old application and I need to implement feature that generates reports based on data calculated from a database. User must also have an additional option of printing the file ( user must be able to choose printer, and must be able to...
10 Jun 2014 by AlwaysLearningNewStuff
INTRODUCTION AND RELEVANT INFORMATION:I am trying to bypass another problem in my application by trying to do printing/print preview on my own.I am trying to create a table that would look like in this picture[^].I am using C++ and WinAPI, on WindowsXP SP3. I work in MS Visual Studio...
28 Jun 2014 by AlwaysLearningNewStuff
I have printing code that draws grid on the paper.Grid has 4 columns, and they have equal horizontal length. Height of the cell is tenth of the paper size. Total number of rows is unknown but I know for a fact that there will be at least one row.Each cell has same physical size-> width...
12 Sep 2011 by AmirAli1374
How to print form in C# by printform in Visual Basic Power Packs?And which property can help for forms have scrolls?I want to show all of form without scrolls.
14 Sep 2011 by AmirAli1374
I draw a chart by graphic lines in Visual Studio Power Packs and now I want to print form but I can't see chart in print page, why?How I can fix it?It's very important please help me.
14 Sep 2011 by AmirAli1374
I want to print a form in C#. I made a form with A4 paper size but after print, printed page have margins and it's not that I want.I used print form controller in Visual Basic Power Packs. How I can fix printer setting?
16 Sep 2011 by AmirAli1374
How to print a scrollable form by printdocument control in C#?
17 Sep 2011 by AmirAli1374
How to print a scrollable form by printdocument control in C#? just with that.
9 Apr 2012 by amitghorpade29
Hi,Am using dot matrix printer...My Problem is am printing invoices in a sheet, after printing the first bill i need to tear off and bring the paper to the initial position to print the next bill, how can i do this please assist me
13 Apr 2011 by Andrei Ramases
i have this code that reflects datagrid values in crystal reports by using datasets. i commit error "The Report Has no Tables" thx in advanceDim report As New CrystalReport1 Dim ds As New DataSet 'Take the data and structure from the datagridview and return it as a...
13 May 2013 by Andrew Rinne
My question is how do you create printEventArgs?The way I have been getting the printEventArgs was through the print_page event from the System.Drawing.Printing.PrintDocument class. or is there a way to trigger print_page event without actually...
12 Aug 2012 by André Kraak
I just tried your code with a PDF printer and it worked correctly.StartDoc[^] and StartPage[^] both have a return value that specifies success or failure.You might want to check the returns values to see if they return success. Either code to check the return value or debug the program to...
16 Feb 2013 by Andy_L_J
Here is what I do. The important stuff is highlighted.You need to work out how much space you have on the page: Dim lpp As Integer = CInt(Math.Floor((e.MarginBounds.Bottom - y) / 18))and ensure that you track where you are in the collection: _curRow and pageLine Dim pageLine As...
7 Feb 2012 by Aniket Yadav
Check This Link1.http://www.c-sharpcorner.com/UploadFile/sushmita_kumari/Report102282006060013AM/Report1.aspx?ArticleID=70bc6bcc-8f4b-4db4-8c63-0dd8b3300203[^]OrSystem.Drawing.Printing.PaperSize pr = new System.Drawing.Printing.PaperSize("B4 (JIS)", 10, 6);put this above stated code...
15 Feb 2013 by Animesh Datta
Hi Everyone....... I want to print a data-set in windows form application . In my dataset there are 5 rows and 3 columns , and i want to print two rows per pages .means there will be 3 pages to print whole data-set. My code is float CurrentX = 20;//This is for X axisfloat...
29 Sep 2013 by Animesh Datta
Hello,here one example for printing multiple pages .int count = 0;//this variable is for total number of items in the list or array int i = 0;//this variable is for no of item per page private void printDocument1_PrintPage(object sender,...
25 Jan 2014 by Ankit K. Saxena
I want to develop a .net application which is used to print Price label of a company through CLS printer. I don't know how to start?? can anyone please help me out for this particular printing application.
1 Feb 2014 by Ankit K. Saxena
sir will you please to suggest me the basic guide of ZPL.
22 Mar 2014 by Ankit K. Saxena
I need to print a bill with the help of TVS 3160 thermal printer which works on ESI/POS Emulation. I have done with my whole software but stucked here... Is crystal report helpful for this????
13 Oct 2014 by Ankit K. Saxena
Hi Sorry for such a late rep but i have done it with the help of crystal report. I have just simply install the printer driver and in crystal report page setup section i have select the printer name and allot the required size as in my case its 80 X roll paper.... and after simply deisgning a...
24 Jun 2011 by ankitjoshi24
HiI am not sure how you can negate the scroll but if you want to print the form then you can try: -PrintDialog printDlg = new System.Windows.Controls.PrintDialog();if (printDlg.ShowDialog() == true){ printDlg.PrintVisual(this, "First WPF Print");}The above code will...
11 Nov 2010 by Ankur\m/
Your best bet would be to call HP Customer Care. Explain them the problem and they would be able to provide you better help. :thumbsup:HP Customer Service[^].This is for India. Change the location in the page below.
29 Aug 2010 by Anoop Athreyasa
Hi all,I'm facing issue with the print button present in the toolbar of IE.Whenever i click the print button, the page's prerender event is called. This happens only in IE. When i try to print with Firefox, this does not happen.I have an iframe in first.aspx page. In the prerender event...
31 Mar 2015 by AnotherKen
I know how to get the printer name and printer capabilities and such. The problem I have is that a new printer in my mother's house goes offline after a few minutes. Although I like this feature, it does mean that she has to get up to turn the printer online and then go back to the computer to...
26 Nov 2013 by AnthonyMG
To get a list of print queues on the local machine, try PrintServer's GetPrintQueues method.Once you have an instance of the PrintQueue object associated with the relevant printer, you can use it to access the printer's status (IsOffline, IsPaperOut, etc.). Also, you can use it to get a list...
16 Apr 2013 by anthonysteven
PosExplorer posExplorer = new PosExplorer();DeviceCollection receiptPrinterDevices = posExplorer.GetDevices(DeviceType.PosPrinter);DeviceInfo receiptPrinterDevice = posExplorer.GetDevice(DeviceType.PosPrinter,"SRP2");PosPrinter printer =...
28 Apr 2014 by Anu Palavila
How can I print labels in SATO printer from my C#.net windows application. Normally I was printing by placing the controls in a form and using print document and graphics I was able to print in normal printers. But after installing SATO printer driver even I could not see the print preview.
4 Jun 2013 by Ariana Bond
I am unable to get the exact problem of yours but regarding controlling the pages to be printed..May be you can control the number of pages but it can be implemented as intermediate process, before going through the printing process it invokes the program, which will control the document pages...
2 Nov 2010 by Arindam Tewary
Hi,I dont think while developing the application you have any control where user(accessing from client machine) would print it. You at most can "fire" the "print" command but rest all is taken care by client's system confiuration.Therefore, you can set aside the idea of instructing your...
26 Oct 2011 by ariswidiantoro
hello..How do I'm get the status printer from the EPSON STATUS MONITOR 3 ?, I've tried to detect the status direct from the driver, not from windows,but I just get the status from the windows, not from DRIVER, the difference :if from the windows after the printing is executed then the...
23 May 2013 by Arun Vasu
Some few days back the same issue came in my project also.The simple and effective solutions is don't use crystal report. try to design text file and print from dos prompt.print file.txttype file.txtcopy tile.txt these command help you to print file from command prompt.still...
13 Jun 2012 by Arvind Salunke
I have one text box with MultiLine Mod in report.aspx page,but when print this page ,does not display whole contain of MultiLine textbox.for print i used following code.href="javascript: print(); in tag
3 Apr 2012 by ASakr
Hi,Am working in knowledge management solution using asp.net 4 c#I want to preview pdf files just for reading, no print no copy no print screen no download and no browser cache downloadis there any way to do this ?
3 Apr 2012 by ASakr
thanks Birajdar for your helpthe pdf file content is very important so I can't depend on slide show technique .
15 Mar 2021 by asarmoh
We have a circulation desk that goes back and forth between an EPSON receipt printer and a Zebra Barcode Printer. The receipt printer is set to default, so the margins are correct until you switch to the Barcode Printer. Once this happens it...
31 Jan 2011 by AschB
Hello,I would like to know if someone knows an (fairly) easy way to create and print documents in Java. These documents must contain multiple tables/images/etc. I've allready tried to print tables using the print method of the JTable, but I find it verry difficult to extend this class so...
12 Nov 2015 by Asgard25
Hi, I hope anyone here can help me.We are busy converting a VB6 project to .net.Some of our reports get build using the old VB6 printer object, when convered to .net we used "Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6.Printer", that works fine, but it's still technically...
20 Jan 2017 by Asgard25
Try thisThis shouldn't be in your PrintPage method, but rather on a button click. Image imgToPrint;protected void btnPrint_Click(object sender, EventArgs e){ foreach (var ii in objListViewItemsData) { System.Drawing.Image img...
22 May 2012 by ashish.shedge
Dear friends,I am developing a windows application using c# in which i have 10 images stored in my SQL database (byte code format).Now i want to retrieve that images and preview them and print them.I tried with a printDocument but it allows me to preview and print only one image at a...
10 Apr 2012 by AshishChaudha
you have to set printer setting for your page...
19 Jun 2016 by Asim Shahid
I developed a report in Crystal Report 2008. I want to send the print from print viewer to my line printer Printronix P8000 but, when I click on print button my print viewer exports it in different option e.g. Adobe Reader, Excel, MS Word etc. but I want to send it directly to the my printer...
11 Oct 2013 by ASP.NET Community
Introduction The CSS media type “print” allows authors to specify a stylesheet that is only used when printing. This can be very useful and
11 Oct 2013 by ASP.NET Community
zebra barcode printing using asp.netIt is really difficult to find something on internet to print zebra code from asp.net form Yes what