Questions tagged [printdocument]

Defines a reusable object that sends output to a printer, when printing from a Windows Forms application.

289 questions
0
votes
1 answer

How to get a PrinterName for a given ip address

I am printing using PrintDocument class. I have a DB table having doc info to be printed. Instead of having its PrintName I just have IP address of the printer. All printers are installed locally. And I'm working on a windows service that will…
Fernando Torres
  • 1,070
  • 8
  • 19
0
votes
1 answer

Printing multiple page Print Document in C#

I tried following the codes based on Printing multiple document in c# window application When the Items was few for printing it does print on a thermal receipt printer. But whenever the item display for printing is more than 1 it cost an infinite…
Bon
  • 309
  • 1
  • 5
  • 16
0
votes
0 answers

C# Print Bitmap in landscape mode

I'm trying to print a Bitmap in landscape mode, but I've run into a few problems. My code is currently: System.Drawing.Printing.PrintDocument doc = new System.Drawing.Printing.PrintDocument(); doc.PrintPage += doc_PrintPage; doc.Print(); The event…
user1782815
  • 195
  • 1
  • 3
  • 17
0
votes
1 answer

Argument in Event Handler using Lambda

I've read a bunch of these similar topics and I can't seem to figure this one out. Before I had something like this: PrintDocument pd = new PrintDocument(); pd.PrintPage += PrintPage; pd.PrinterSettings.PrinterName =…
Matt Winer
  • 495
  • 9
  • 26
0
votes
1 answer

The page size cannot be modified when printing with PrintDocument in C# on certain machines

It is a very simple program. Literally print "Hello World" with the selected canvas size. It works fine on 4 machines in my test (including Win 7 and Win 8), but doesn't work on 2 other machines (both Windows 7), on which even I selected ANSI E, the…
Ben
  • 73
  • 1
  • 1
  • 6
0
votes
0 answers

The same output for all graphics objects

I have several outputs for my datas and want to create one fill-Object for any output-possibility. For example PrintDocument and Bitmap. Thats works with Graphics-Object, but the result is different. My test method for fill graphics: protected…
TTopsecret
  • 43
  • 4
0
votes
1 answer

How to print invoice in a particular format on a thermal printer

I am designing a software application for a Hotel. I want to print the invoice from a thermal printer and I want to print specific columns from the DataGridView. I have done most of the work but when name of item get larger then the string move out…
0
votes
1 answer

C# Printing Y position changing alone

I'm trying to create a sort of a receipt. What happens is that I don't have the driver (nor exists for my OS) of my printer. So I've installed a Generic Printer Text Only. My printer is one of the POS printers. This is my configuration: int _x =…
Linesofcode
  • 5,327
  • 13
  • 62
  • 116
0
votes
2 answers

Changing from Portrait to Landscape PrintDocument/PrintPreview

I've been reading reams of documentation about PrintPreviewDialog, PrintPreviewControl and PrintDocument. Everything says that I have to put the Portrait/Lanscape bit into the PrintDocument QueryPageSettings Event, then the PrintPreviewDialog will…
JA12
  • 61
  • 1
  • 4
  • 12
0
votes
0 answers

Most reliable way to detect printer status using c#

I am writing an application in which users needs to make sure that the printer is online/working before they print the invoice. Most of solutions on the internet point to WMI class to query for printers and their properties including PrinterStatus,…
Lamar
  • 1,761
  • 4
  • 24
  • 50
0
votes
1 answer

Printing a textbot text

I'm trying to make a program that prints a textbox full text. When I'm generating it to a pdf to see the page before I print it some of the text is missing. This is my code: private void Print_Click(object sender, EventArgs e) { PrintDialog PD =…
user2992413
  • 77
  • 1
  • 8
0
votes
2 answers

Print multiple jobs without interruption c#

Is there a way to print multiple jobs in a row, without letting another user send a print job in between? (sort of "don't give the token to another user as long as my print jobs haven't finished") It's a shared printer and many users have access to…
Hala
  • 13
  • 4
0
votes
2 answers

Silverlight: PrintPage infinite loop although HasMorePages is false

I'm printing a grid containing several rows in Silverlight. Whenever the grid height is more than the PrintableArea I set HasMorePages to true and break, else HasMorePages is set to False. This code however causes an infinite loop, for the…
user3340627
  • 3,023
  • 6
  • 35
  • 80
0
votes
1 answer

Print multiple images on one page

I want print some image with 3*4 Dimension or 4*6 in c# sent an Image (jpg, png, etc) to a function then user selected a Dimension and count of picture , show print dialog and print it. (for example : Ordering at side by side 12 photos…
0
votes
1 answer

PrintDocument1_PrintPage vb.net

i've tried to print a document with many rows in my datagridview and i want to print it continously by having next page with the data not including the 1st page but it gives me the same as 1st page heres my code : dim i as integer Private Sub…
Mark
  • 5
  • 4