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

Printing multiple pages with printdocument

I'm making program, which: After you select few rows in datagridview it checks if 1 or more was selected. If one, print two copies of report on one page(One report = half page) If more: Print two reports per page, printing as much as needed pages.…
0
votes
1 answer

Print two documents with one same button

I'm printing two documents with Single button click. When i do this, I have an error like : Dialog boxes must be open by user. Here is the code : PrintDocument monDocument = new PrintDocument(); btPrint.IsEnabled = true; monDocument.PrintPage +=…
provençal le breton
  • 1,428
  • 4
  • 26
  • 43
0
votes
0 answers

Cant get the print preview for the panel C#

I want my program to show the print preview of the panel only but instead its showing the whole paper size. How to set the print preview of this? Bitmap MemoryImage; public void GetPrintArea(Panel pnl) { MemoryImage = new…
ViFer
  • 283
  • 1
  • 6
  • 23
0
votes
1 answer

Printing Creates an Dialogbox and I dont want that

Creating a print option with a screenshot of the form as i needed the whole form for sure. Which Leads to the additional printing dialog box to the printout. Here is the code, private void printDocument1_PrintPage(object sender,…
Developer
  • 231
  • 4
  • 19
0
votes
1 answer

PrintDocument doesn't print the full form

I want to print the entire form of size (1415x1000). But it is printing the form of size (1185x740). I refer to the code from the msdn website: [System.Runtime.InteropServices.DllImport("gdi32.dll")] public static extern long BitBlt(IntPtr…
Developer
  • 231
  • 4
  • 19
0
votes
1 answer

Create PrintDocument from .xps file in c# winforms

On this thread I tried to figure out how to get an image created from a pdf file, fill the blanks and print it out. I managed to print a usable but blurred image of the pdf. Trying to improve print quality, I searched for alternate ways to edit and…
pzogr
  • 424
  • 1
  • 12
  • 30
0
votes
1 answer

vb.net printing error: print_printpage continues to loop even though e.hasmorepages = false

So here is my situation: First of all, all of my printing code is stored in a module, which is called when I click the print button. My problem is, my pages print fine the first time I print my document, but if I click print again, the pages start…
lucky.expert
  • 743
  • 1
  • 15
  • 24
0
votes
1 answer

How to make printdocument class work after deploying in iis?

I have project in asp.net which prints bill. I have made my own Printing class inherited form PrintDocument form System.Drawing.Printing and it works fine in the visual studio development server. However it doesn't work after deploying in IIS. After…
0
votes
1 answer

how do I accomplish secure printing in C#?

I need to print documents to the printer such that the user is required to enter a PIN before the document is printed out. In my research thus far the only method I have seen accomplish this is to print the document to a PRN file and then edit the…
0
votes
1 answer

Printing 4 similar images to one document c#

I have a hopefully simple question this time: I want to print items which are looped through and printed in 2x2 per page. I'm using a loop for that, and a Rectangle array. That can change though. What's the simplest way to print to the certain part…
Whoop5
  • 47
  • 2
  • 12
0
votes
1 answer

Printing all controls in a winform c# using PrintDocument

I got a windows form which has more than one page of mainly labels and textboxes, I'm trying to keep the font that i have in the winform already, so far I'm able to print the first page, but when i try to add the rest of the controls it does all…
Ubaldo Quintero
  • 169
  • 3
  • 15
0
votes
1 answer

Increasing paper height per iteration using printdocument

i m using printdocument for a printout. i want to increment the size of the paper after each row is added. I found a similar question here and here. But the solution doesnot work. I m using a Component class to override the base method of…
Pankaj Nagarsekar
  • 219
  • 1
  • 6
  • 17
0
votes
1 answer

No margin print with Epson TM-U220D

I am using this Epson TM-U220D printer for printing receipts. By default, the margin is set to 1 inch on all four sides of paper.I do not find any options to edit it in the printer utility nor in any printer manual. I tried finding in Google. But no…
Pankaj Nagarsekar
  • 219
  • 1
  • 6
  • 17
0
votes
1 answer

Printing all items of ComboBox using PrintDocument

I am trying to print all the contents of a combobox in a program, numbered. ComboBox1 contents: Yes No Maybe No Opinion My code so far for PrintDocument1: Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As…
wathsun
  • 11
  • 1
  • 1
0
votes
0 answers

Getting blank page using Print Document?

Before this application was working perfectly , now i have problem with printing document , i am using drawstring to write report , but all data which is under loop not printing and other like Heading and footer printing normally. where is problem…
Saqi
  • 151
  • 2
  • 5
  • 12