Questions tagged [printdocument]

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

289 questions
2
votes
1 answer

Drawing and Printing complex document in C# (improving/replacing my PrintDocument)

I am trying to produce a document in C# mainly to print. Basically it is a form, where I will fill in the values from objects from a database. The code I been using in the past is ugly, long, a pain to write and worse to maintain. public class MyDoc…
jb.
  • 1,848
  • 9
  • 27
  • 43
2
votes
1 answer

How to printing a document in silverlight

I've written an application web in silverlight for view Tiff files. I send an absolut uri of Tiff files to silverlight app and it view /zooming or download a file. I print the tiff with PrintDocument library, but the file sent to printer is very…
davymartu
  • 1,393
  • 3
  • 15
  • 34
2
votes
2 answers

PrintDocument.Print is slow unless user is logged in to the printing computer

I have a web application hosted on server 'A' (SA) and a web service for printing hosted on server 'B' (SB). SA creates and image that needs printing and sends it to SB. When doing this, printing is fairly slow, around fifteen seconds. However,…
JSprang
  • 12,481
  • 7
  • 30
  • 32
2
votes
2 answers

What does Hasmorepages PrintPageEventArgs property do exactly?

I am trying to understand what Hasmorepages PrintPageEventArgs property is, why would you use it and how does it work. MSDN Library doesn't really have a good explanation. All they say is that if you set it to true, printpage event is called again.…
ThN
  • 3,235
  • 3
  • 57
  • 115
1
vote
1 answer

C# PrintDocument - table / grid layout trouble

I'm trying to print out some data to a page in a table / grid format. At the moment i have it working, but everything is drawn out manually. Fairly hard-coded values for the width and height of each cell. What I'm trying to do is turn it onto a more…
jb.
  • 1,848
  • 9
  • 27
  • 43
1
vote
1 answer

PrintDocument scale to fit page

Let’s say I have a PrintDocument with unknown number of pages. How could I scale it to fit everything on one page? Edit: I am trying to achieve something like “fit to page” when printing.
witpo
  • 465
  • 3
  • 11
  • 23
1
vote
1 answer

why this text data was not getting print through a printer?

when i am trying do printdocument1.print(); system was showing a small model pop up as the file name and system getting keep silent with out throwing any error any thing here is my c# code behind code: using System; using…
pravz
  • 235
  • 1
  • 7
  • 18
1
vote
0 answers

Problems with print out a Win Form

I have a child WinForms Form that I want to be printed out. In my project I've included components prnDocument, prnDialog and prnPreview. I have copied an example from Microsoft site. private void btnPrint_Click(object sender, EventArgs e) …
DataSalad
  • 11
  • 2
1
vote
0 answers

How to print A4 size Page

I write code for the print a4 size panel with attach image. so, panel is print in A4 size but image is center the paper. here you can see my code. if anyone know what is the problem please tell me. private void btn_print_Click(object sender,…
1
vote
1 answer

C# StringTrimming.EllipsisCharacter not properly truncating text in PrintDocument

I am building a C# WinForms app, and I am working on a PrintDocument to generate an order ticket. Each line in the order detail includes a SKU, item description, price and quantity ordered, and part of what I need to is to make sure the item…
TC_Guy
  • 127
  • 9
1
vote
1 answer

PrintDocument with Image VB.net

Is Possible to get Image in pdf where we save pdf from PrintDocument Here i added an picturebox , button, printdocument, printpreviewdialog In printDocument Code: Public Class Form2 Private Sub PrintDocument2_PrintPage(ByVal sender As…
1
vote
0 answers

Printing nested loops using C# PrintDocument and the PrintPage event

I am writing a C# WinForms app, and part of it includes generating inventory reports. I can't print the inventory one item per line, because each inventory item may be located in more than one location. So, the goal is to print the name of the…
FrontRangeGuy
  • 101
  • 2
  • 10
1
vote
1 answer

Tricky issue with nested loop printing using C# and PrintDocument for WinForms application

I am working on a function in my C# WinForms application that lets me print warehouse pick orders to a PrintDocument, like so: I am using the following c# code to generate this: private void pdPick_PrintPage(object sender,…
TC_Guy
  • 127
  • 9
1
vote
1 answer

Can I create a second page with it own content with printDocument C#

I am a PHP developer doing a C# project. I am busy with a C# winform project. On printing a document I need to add a page with different content than the first page. To be clear.I need two pages, each page with its own content. Currently it is…
CharlieT
  • 373
  • 4
  • 26
1
vote
0 answers

I want to add pdf and excel buttons in printpreviewdialog page in c#

I want to add pdf and excel buttons on the printpreviewdialog page in the link below. I did my work with the printdocument item in the Toolbox without using tools like iTextSharp. I want to add PDF, Excel and Close buttons. Thanks. emphasized text:
tercii
  • 11
  • 1