Click here to Skip to main content
15,892,161 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 

17 Feb 2024 by Jo_vb.net
I think this article could be a good starting point for you: Monitoring a Printer Queue from VB.NET[^]
17 Feb 2024 by Member 10218145
I have a VB.NET desktop application for a computer lab. I want that application to be able to detect a printing process thru a network printer & get how many pages my user are trying to print. What I have tried: I have not found any suitable...
3 Feb 2024 by tMichu
Hi thank you for all the replies - like you said it's probably the driver issue. I changed the OriginAtMargins to True and moved the objects in the report so it's easier to control the result.
30 Jan 2024 by Lawyer Sonia
The issue may stem from the physical printer's settings or drivers. Ensure the printer driver is up-to-date and supports the A5 paper size. Additionally, check the printer's margin settings to prevent cropping issues, as observed with the Virtual...
29 Jan 2024 by OriginalGriff
Without your code, we can't be sure - but I'd guess it's something to do with margins. Because of the way they handle paper, some printers can't physically print on the left or right edges, or near the top or bottom of the page. These borders may...
29 Jan 2024 by tMichu
Hi, I have prepared a document on A5 page with e.Graphics methods. When I get the print preview window the layout of page is ok. When I send it to physical printer then it is cropped left upper corner is ok but bottom right is cropped. When I...
1 Jun 2023 by Member 11788039
I have the source code for a print button. the print runs but all that comes out of the printer is a blank page. how do i fix this so i can print my document? Thank you What I have tried: Private Sub BtnPrint_Click(sender As Object, e...
1 Jun 2023 by Dave Kreskowiak
The Print system does not do the printing for you. Think about it. Where in your code do you have anything that describes what the printed page is supposed to look like? You don't have any! The Print system exposes a framework for you to write...
31 May 2023 by OriginalGriff
Unless you have added code to the PrintDocument.PrintPage Event (System.Drawing.Printing) | Microsoft Learn[^] event handler to actually generate output, all you will get is a single blank sheet. The link includes sample code.
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...
19 Jan 2023 by Scott Perrin
I have a .lbl file which is used to print out information from a program. The line in the file, as seen in notepad, is : ROW3 = "" ROW3_STYLE = 0 I would like to manually have " Serial # " printed on the label on the...
19 Jan 2023 by RedDk
Good Morning Mr. Perrin, https://help.nicelabel.com/hc/en-001/categories/4405112932113[^] is the NiceLabel Knowledge Base page. Go there for information. Shouldn't you?
11 Jan 2023 by Steven Borges
I just installed my EPSON TM-T90 Receipt and I wanna test it using C#.I tried googling it, but haven't learned much about it...What I want to do is simply print a line of code, for example "Hello World".I tried using the following: char esc = (char)27; char ff...
31 Dec 2022 by Graeme_Grant
As I am unfamiliar with how to print a Datagrid using ProtDocument, I did a quick google search: c# print datagridview using printdocument - Google[^]and there were lots of solutions - first 3 results: * C# DataGridView Printing[^] * How To...
29 Dec 2022 by OriginalGriff
You don't pass a string to Graphics.DrawImage Method (System.Drawing) | Microsoft Learn[^] - there isn't an overload that takes one. Instead, you need to get the Image that the cell contains and pass that instead.
17 Dec 2022 by Member 15771242
[SOLVED]After days of searching, I found this solution obviously being new to this field, it's an inelegant solution but it works. However I will look for a better solution. Hope it helps someone. private void btnPrint_Click(object sender,...
17 Dec 2022 by Member 15771242
I have 15 columns in dataGridView1, I would like when I print, it shrinks to fit all on one page. I would like the 15 columns to be seen all on one page while as it is, one column is outside and is printed as a second page. How to fit all the...
15 Dec 2022 by OriginalGriff
How to print labels in Word
14 Dec 2022 by Michele Signorile
This solution doesn't work as there is no Fit To Page (printer.FitToPage) property for DGVPrinter, would you please show me how it worked for you?
10 Dec 2022 by CodeGuru84
To fit all the columns of a DataGridView on a single page when printing, you can try setting the FitToPage property of the DGVPrinter object to true before calling the PrintPreviewDataGridView method. This will cause the columns of the...
5 Jul 2022 by IT PRASUMA
Hey Guys, I have thermal printer which supports ethernet connection. Currently, I'm connecting the Thermal Printer with the Laptop via USB but now I have some another requirement. So I want to connect the Thermal Printer with my Android Phone...
3 Jul 2022 by IT PRASUMA
Hi Gary Doo, I'm also finding the solution for the same problem. But I have one question, as you said you are successfully printing to thermal printer from android phone over the network, can you please tell me the solution to print over the...
24 May 2022 by Cody O'Meara
Hello!. So we have a PDF that I am converting to a VB.net form in our project so I can pull in some of the data from SQL server to save time for our employees that do these. The goal is that the employee will be prompted to enter an ORD# which...
4 Mar 2022 by marcel zol
I want to change pages with mouse wheel in print preview dialog.I have this code but it is not working:in Form1 code is: private void toolStripButton1_Click(object sender, EventArgs e) { Meni m1 = new Meni(); m1.Natisni(); ...
4 Mar 2022 by Member 12412609
I have done and it is working with the following code (in VB.net) - you can change it to C# easily 1- First you should to know the number of pages, so count the page number in printpage event (PrintDocument1.PrintPage) (in my code the Variable...
27 Feb 2022 by Member 14047666
In Win 10 Pro 20H2 (OS Build 19042.685) OS, When file is printed to virtual printer driver from Photos App, then Print Job is started Windows and Spooler (.SPL) generating file's in "C:\Windows\System32\spool\PRINTERS" directory. File is printed...
27 Feb 2022 by OriginalGriff
This is not a development question - or if it is it's lacking any sign of development content - and this is a dev site. Please try a Windows support site, such as Microsoft Support[^] They will be able to help you much better than we can.
22 Feb 2022 by Chaima Znaidi
Hello everyone ^^ I am working on a project where I am using CUPS as a printer server. I want to hold all new printer jobs, check the cartridge levels of my printer and one by one release jobs for printing. I want to enable the hold-new-jobs...
14 Dec 2021 by Member 15310789
Autogenerated check value coming inside GS1-128 barcode What I have tried: I just checked firmware version and all but there is no change .
14 Dec 2021 by OriginalGriff
GS1-128 includes mandatory check digits: it isn't a valid code without them. It is very, very unlikely that any software you find will allow you to disable the check code.
9 Dec 2021 by Donald Brooks
I'm looking for assistance with writing C# network scanning program that will discover printers on a specific subnet. What I am not looking for is how to query network printers already installed on my PC or the print server. My goal is to scan a...
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#[^]
6 Nov 2021 by BobbyStrain
I am looking for a new laser printer/scanner. Does anyone have experience with Brother Compact Monochrome Laser Printer, HLL2390DW? I saw a discussion here recently about laser printers, but I can't find it. Any recommendations? It's for home...
6 Nov 2021 by OriginalGriff
Quote: I want to replace my Epson inkjet. Can't say I blame you - I got fed up and dumped mine several years ago in favour of a Samsung C430W and I am soooo glad I did! I plug it in when I want to print, I print, I unplug it. And it works first...
6 Oct 2021 by DoingWork
How to Configure EPSON TM T88III Printer in Win7 with USB to Paralell Converter. What I have tried: I have connected Printer via Parallel to USB Converter. I have Virtual Serial Port. In Devices and Printers: I click to Add Printer. Selected...
6 Oct 2021 by OriginalGriff
Try here: TM-T88III software - Epson[^] If it still doesn't work, you may have to get a bus-mounted parallel port instead of USB - but the chances are that a new printer would work out cheaper in the long run ...
5 Oct 2021 by Dennis Price
I have created a Form using VB and I can not get it to print. I have loaded all the Print Things below the Form. Tried different Codes and nothing works. I can get it to go to the Printer, but just spits out a plain sheet. What I have tried: I...
5 Oct 2021 by OriginalGriff
We can't be specific: there are two ways to print in VB, the older VB6 compatible way using PrintForm Class�(Microsoft.VisualBasic.PowerPacks.Printing) | Microsoft Docs[^] which literally prints the content of a form on paper, and the more modern...
14 Sep 2021 by Member 9879435
Hi! Good Day Everyone I'm not really a hardcore developer and this my first attempt to do some printing, so I have been hoping somebody could help me out on my simple tool that I am trying to create. So it's like this We have this pre made...
14 Sep 2021 by TheRealSteveJudge
There is no need to do programming here. It was already suggested to look up "Mail Merge". Here is a step by step guide which shows you how to accomplish your task: How to Mail Merge from MS Word and Excel (Step-by-Step Guide)[^]
28 Aug 2021 by Firas Al Monagid
I used to code using vb6 but 2 years go started using vb.net and others. I am programming a retail sales system that should print on 4 types of printers, Receipt, A4, A5, and Label. my problem is that I need to print the receipt without...
28 Aug 2021 by Michael_Davies
Hi, Microsoft provide code to write directly to printers, useful when you want to line print and send escape sequences to control the printer directly rather than page print. My example; Print Direct To Windows Printer (EPOS Receipt)[^]
23 Aug 2021 by Slow Eddie
I am creating an eCommerce website for a client. I am using web forms. I do not know how to print a copy of the Order to the printer of the user logged in to the web page. I would appreciate any help you can offer me. What I have tried: I...
23 Aug 2021 by Patrice T
Quote: I do not know how to print a copy of the Order to the printer of the user logged in to the web page. Basically, you don't. On your site, you generate a page printer friendly or generate a PDF with receipt, and the client prints it if he...
23 Aug 2021 by Richard Deeming
Code running on the server (C#, VB.NET, etc) has no access to hardware attached to the user's computer. Code running on the client (Javascript) has virtually no access to the user's hardware. All you can do is call window.print()[^] to print the...
23 Aug 2021 by Richard MacCutchan
Begin at the beginning: ecommerce print order - Google Search[^].
26 Jul 2021 by Member 14716396
When i used for loop to print database table and that data is of two pages, then i use e.hasmorepages=true. but e.hasmorepages is not stop.Means continue. The code is below: Dim x As Int32 = e.MarginBounds.Left Dim y As Int32 =...
26 Jul 2021 by OriginalGriff
What HasMorePages does is tells the PrintDocument that you are finished, or not. If you aren't (HasMorePages == True) then PrintPage gets called again so you can generate the next page. It doesn't "break" the page immediately you set it's value -...
7 Jul 2021 by Nkm 2021
I am currently trying out the VB.NET PrinterSample_Step1, "Hello OPOS for .Net" . I have installed the driver for TM-H6000IV using EPSON advanced driver and set it up in the SetUpPOS for OPOS.NET . When I run the sample program, it will return...
18 Jun 2021 by OriginalGriff
I'm getting a 3D printer for Christmas! So - I need to learn to use it. That means ... a CAD package. Gulp.
6 Jun 2021 by Member 13541763
i am working on printing a document for my class group task. but i couldn't find anything to print from c++ console app. is it possible to do so? if yes, how? What I have tried: cannot implement PAGESETUPDLG, PrintDocument,
6 Jun 2021 by pierre_j
While that shows up on google on page 1. A possible solution would be to use: PdfCreateRenderer function (windows.data.pdf.interop.h) - Win32 apps | Microsoft Docs[^] then clone the GDI, convert to the right bitmap format to send to the...
4 May 2021 by nkm00e
I would like to find out what data is sent to the printer driver when we print. For example when I print from NotePad or Word, what is actually passed to the printer driver before it converts the data for printing? What I have tried: I would...
4 May 2021 by Richard MacCutchan
Build a basic v4 printer driver - Windows drivers | Microsoft Docs[^]
3 May 2021 by OriginalGriff
Seriously? It depends on the app, the printer, the driver, and a host of other things. You aren't going to find a simple solution to your problem - three questions on it now, or is it four? - other than modify your app to save the data while it...
6 Apr 2021 by Firas Kassoumeh
Printer is GoojPRT portable printer PT-210 (thermal printer) the same code is work on another thermal printer POS but not work on this printer for Arabic characters the English characters is good but the Arabic characters is shown as chinses...
6 Apr 2021 by OriginalGriff
You probably need to talk to the printer manufacturer about this - it's almost certainly a case of the wrong font being used, but how you select a font on the printer will likely depend on the make / model. Google will find you tech support in...
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...
15 Mar 2021 by Richard Deeming
Code running on the server has no access to hardware connected to the client. Javascript code running on the client has extremely limited access to the hardware connected to the client. It does not have any way to control the default printer, or...
23 Feb 2021 by trucido79
Good afternoon,I'm currently developing a kiosk system making use of a BOCA printer on USB port for ticket printing purposes.I communicate with the printer using winspool.drv functionality.Sometimes when the application starts up with no tickets loaded in the printer a test print...
23 Feb 2021 by Tod Flak
I concur with comment by CzBonfire, 4-Jun-15 8:09am. His code also worked for me! Seems strange to declare a "new PrintQueue(ps, ...)", but if I try to simply do "ps.GetPrintQueue(strPrintQueueName)", I get a valid PrintQueue object, but when...
20 Feb 2021 by Stan Huang
My platform is ubuntu 11.04 / iMx6. I would like to verify a printer. When I tried to install a USB Printer driver, usblp.ko with command: "insmod usblp.ko", I got response of"insmod: error inserting 'usblp.ko': -1 Invalid parameters"I found some discussions about similar phenomenon;...
24 Dec 2020 by juliashs
I should print PDF using my C++ app in Windows 10 without opening "Save file dialog". Previously I used "Generic Postscript Printer" to save file with the given name as ".ps" and than converted it to PDF using another application. Windows 10 doesn't support "Generic Postscript Printer" but has...
24 Dec 2020 by Member 11005432
Try this // generate a file name as the current date/time in unix timestamp format string file = (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds.ToString(); // the directory to store the output. string directory =...
5 Nov 2020 by Kabin Kc
I am developing hotel billing system that prints the bill receipt using thermal printer but i am stuck at [Errno None] Other errors python3.9 library: escposprinter & libusb-1.0, plateform:windows 10 Thermal printer: xlab xp-58III from...
30 Oct 2020 by Member 14941856
I want to print barcodes from crystal reports. What we are failing to perform is printing it to CENTER of page sized 5.199*2.600 cm .We are missing something. This is a freelance work we are doing from home. Our work is not complete until...
31 Aug 2020 by DoingWork
Crystal Report: How to change User defined page size (Horizontal and vertical) at runtime What I have tried: --> Visual Studio -->Crystal report --> Design --> Page Setup --> Page Options -->Horizontal to 9 inch -->Vertical to 55 inch
31 Aug 2020 by Sandeep Mewara
The elements are derived from Printer settings. You can change the paper size at runtime to defined sizes. example snippet: boReportDocument.Load(Server.MapPath("CrystalReport.rpt")); PrintOptions boPrintOptions =...
31 Aug 2020 by Richard MacCutchan
Crystal Report: How to change User defined page size - Google Search[^]
30 Jul 2020 by Golden Basim
hi, i search for the best way to print barcode label (designed with XtraReport) multi-times. ex- if i have purchases invoice that contains this items. ----- code ---- name ---- Quantity ----- ----- 1234 ---- item1 ---- 5 ----- -----...
28 Jul 2020 by JANeets
Before everyone tells me I am mad I know. Who would in their right mind use a dot-matrix printer in 2020. Well, I am! We are trying to use it to print shipping information for transport companies who do not have a digital system to manage their...
28 Jul 2020 by Patrice T
Quote: How do I print to dotmatrix printer using escp Sending directly commands in printer language without windows messing your command is named raw printing. Details depend on the programming language, so you will have to do a little search. ...
23 Jul 2020 by Golden Basim
why Barcode Printer print only one label. OS : Windows 10 my code : i use this function to get all the items data in the invoice and its quantity, then i collect together into a List private void printAllItems() { ...
23 Jul 2020 by Patrice T
Quote: Why barcode printer print only one label? If you don't tell otherwise, a printer prints 1 label at the time. It may depend on the printer and its language. Size of label doesn't matter. What matters is the printer brand and language used,...
14 Apr 2020 by OriginalGriff
If you mean to a printer, then Rick has it covered for you. If you mean to try and print graphics that the user can see on the screen, the a Console is not the solution you want - and that is probably why none of the solutions you have tried...
14 Apr 2020 by Mark Hubelbank
I am completely new to C# and am using the need to print a simple graphic (lines and text) from a command line application to learn something about C#. This program will read a data file and generate the graphic line by line. Everything that I...
14 Apr 2020 by RickZeeland
If you want to print to a printer see the example here: PrintDocument.Print Method (System.Drawing.Printing) | Microsoft Docs[^]
17 Feb 2020 by Bhargava Katta
I am developing a interal application for our organization where we have default Windows authentication for all applications.My requirement is to display all installed printers in the local machine. I am using WebClientPrint for ASP.NET to load printers.I have installed the...
8 Dec 2019 by zlristovski
I have C# who communicate with dot matrix printer on LPT1 port. I want to send control codes on the printer, but when I am sending the codes, printer is not responding, it answers only when I send FF code. I want to send this code ESC EM 82, but I don't know how to format it, FF I am sending hex...
26 Nov 2019 by OriginalGriff
Well ... you read the same data from the DB each time that method is executed - so as long as the DB contains 30 or more items, you will print the first page, tell the system there are more pages to print, and exit. The system will then call you again to print the next page, you will read the...
26 Nov 2019 by Prachi92
I want to print database value on multiple pages (30 values on one page). By using while(dr.Read()) loops goes infinitely and the same data is displaying on each page, How to solve it? What I have tried: private void test2_Load(object sender, EventArgs e) { itemperpage =...
25 Nov 2019 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.
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.
30 Sep 2019 by JordanTrajkov
I have instaled asp.net application on a server. I want to display network printers in a dropdown and i use this codes to achive that goal: Protected Overrides Sub LoadPrinters() Dim permison As New PrintingPermission(PrintingPermissionLevel.AllPrinting) If Not...
27 Sep 2019 by Member 14605311
I'd like to completely control modern color laser printer (which supports BitBlt) - to be able to print at any point=dot (say 600DPI) any of only 8 really available colors: Cyan Magenta Yellow blacK C+M=Blue C+Y=Green M+Y=Red (8th - white), bypassing both color-conversion and dithering...
27 Sep 2019 by steveb
Printer has been abstracted away into the device context decades ago. So you write/draw to the printer in the exact same manner as you do it to the screen. You just use the 'Printer HDC' instead of 'Display HDC'. All the rectangles and coordinates will be that of the printer HDC. Just look up...
17 Sep 2019 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).
13 Aug 2019 by Richard Deeming
The number after the % is the "zone index" (aka "scope ID") for the address. It's used by the OS to determine which network interface to use when talking to the address. IPv6 address - Wikipedia[^] Why is there a percent sign '%' in the IPv6 address? - Super User[^]...
13 Aug 2019 by Nitin R G
IPv6 address displayed "%" character instead of "/" character. 1.when the printer and system are connected to private network and IPv4 is disabled in system(PC). 2.printer is searched automatically using installer and displayed IPv6 address. But IPv6 address displayed as...
29 Jul 2019 by Dave Kreskowiak
Your question makes no sense. Web App? Console App? Windows Service app? You didn't do a very good job of explaining what app is running where and how these apps relate to each other. What are these apps doing? How does this "Print button" work? What is the code behind it? "Default Printer" is...
29 Jul 2019 by samir1286
I have some problem when i have print direct to the local as well as network printer. I create a Web Application where Print button there, and i also create a window console application for get default printer name. when i create to call this console application via Web API, it will be work...
21 Jul 2019 by OriginalGriff
When you use a PrintDocument, it raises a PrintPage event and passes a PrintPageEventArgs which provides information on how to print - including the Graphics object you should print on. When you use PrintPreview the context is for the display, for a printer it's the actual "print surface" that...
21 Jul 2019 by HKHerron
There are tons of solutions about how to handle printing multiple pages when there is not enough room to print on a single page. However, I can not find a solution where you can print a multiple page report with print preview. It's not that my information doesn't fit, it fits perfectly as I use...
6 Jul 2019 by Dave Kreskowiak
You can't. If you think about it, it's pretty obvious why. Until fairly recently, browsers didn't know how to render a PDF file on-screen. The browsers used the MIME type of the content to determine that it was a PDF file and looked up any registered "handler" for that type to decode and...
6 Jul 2019 by Parazival
I am displaying the PDF in Browser using iframe but i want to disable the PDF viewer print method and need to print PDF file using asp.net button thanks for advance What I have tried: function print() { var objFra =...