Questions tagged [printdocument]

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

289 questions
3
votes
1 answer

When I print bitmap, it eats up some of it

In my application i have a chart which is surrounded inside a panel. I added a printdocument component from the toolbox and when i want to print the chart, i am creating a bitmap and i get the panel inside the bitmap (and as a result the chart which…
George Georgiou
  • 455
  • 2
  • 14
  • 27
2
votes
1 answer

How to print all elements or generate PDF from TabControl?

I have a silverlight application which consists of a few tabs, which I would like to print or to generate PDF containing these tabs. I tried to use StackPanel to add each tab and then use PrintDocument to print what I see, but there is a problem…
2
votes
1 answer

How to set default printer in asp.net?

I want to set a default printer to print the docs from my web application. I don't know how to set it. As all the users using this application should have a specific printter accttached to their PC. Please help me. Thanks in advance.
Ram Singh
  • 6,664
  • 35
  • 100
  • 166
2
votes
4 answers

Issues Resizing Image to fit on a printed page

I am trying to print an image (from file) to a the printer using a PrintDocument. I am re-sizing my image so that it is scaled to be full page on the printout when I print this the image is cropped slightly. EDIT 2 I am using the margins to…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
2
votes
0 answers

Print form printDocument c#

I need help printing the form. I used the ControlPrinter class How to use PrintDocument with a scrollable Panel? , I didn't make any changes to it, and it only prints the background of the form anyway.Please advise me what I did wrong. Thank you in…
petule.08
  • 41
  • 4
2
votes
1 answer

Cannot print Arabic/Persian letters correctly in C#

I have problems with printing typing Arabic letters in C# using printdocument. Here's my code: PrintDocument pd; PaperSize ps; void pd_Factor(object sender, PrintPageEventArgs e) { Graphics g = e.Graphics; Font vazir = new Font("Vazir Code…
S0m3on
  • 21
  • 3
2
votes
1 answer

Codes to print PDF not working at the last step

I am writing an app that can create Maths worksheet with answer pages in PDF format. I want to add a print function to allow printing the worksheet directly from the app. In the PrintDocumentAdapter, the first half of the codes check the color of a…
Wakeman
  • 103
  • 7
2
votes
1 answer

IronPdf Print to Margin

I try to print a pdf with IronPdf from html but the result leaves a border. Is there a way to set Fit-To-Page in my PrintDocument? Here my code: public static void PrintDocument(string printer, bool landscape, PdfDocument pdfDocument,…
Felix Arnold
  • 839
  • 7
  • 35
2
votes
1 answer

How do I print clear text from a windows form?

I have successfully printed a windows form, but all the text is slightly blurry. I have concluded that this is a result of the resolution of the screen being much less than the resolution the printer uses. Is there a fundamental flaw in my approach…
2
votes
0 answers

How to add border to PrintDocument C#

Iam new in WPF application development. I want to print the contents of a form to printer. I have following code string s = "Name : Test" + Environment.NewLine + "Age : 25" + Environment.NewLine + "Sex : Male"…
Abdul Manaf
  • 4,933
  • 8
  • 51
  • 95
2
votes
1 answer

Does PrintDocument sends whole document to printer or line by line?

A little context: I'm developing a Windows Form app that contains a feature where the user prints some info. The thing is that the size of that information can change from time to time: sometimes it can fit on a single page or sometimes it can be…
Adan Sandoval
  • 436
  • 1
  • 6
  • 18
2
votes
1 answer

PrintDocument: Fit to page

I am using PdfiumViewer in order to print a PDF file: using (PdfDocument document = PdfDocument.Load(pdfFileName)) { using (PrintDocument printDocument = document.CreatePrintDocument()) { printDocument.BeginPrint +=…
Willy
  • 9,848
  • 22
  • 141
  • 284
2
votes
0 answers

Print to PDF from Excel with variable filename interpreted with Sendkeys

I tried searching throughout but could not find a definite answer. Rather people have only suggested alternatives to similar questions but not a proper answer. My excel version is 2010. I need to print multiple pages from multiple excel files to a…
Shaiy10
  • 21
  • 3
2
votes
3 answers

Using an internal network, is it possible to print documents silently?

I have a client that hosts a touch screen kiosk in their lobby. It's essentially an internal html website. They want customers to be able to click a link and have a pdf print without seeing a print dialog or having to back track... completely…
Diventare Creative
  • 481
  • 3
  • 11
  • 31
2
votes
1 answer

Programmatically print an XPS file to a physical printer

I have a C# WinForms application. A user uploads an .XPS file and specifies some printer settings (number of copies, paper tray, etc). The program needs to programmatically print the document with these settings. That is, there can be no user…
luxdvie
  • 902
  • 8
  • 16