Create a document with particolar paper

  • Thread starter Agnoletto Christian
  • Start date
A

Agnoletto Christian

Hi,
i create a particolar papername on my printer.
Now i need to print on it.

I try to select this papername as default for the printer but when i print
in the dialog box the paper kind is A4 and not "Ricevute".

How can i force this paper size?

Thank's
Christian
 
G

Guest

What does your print code look like?

If your page size settings have been setup propertly in the Control Panel,
it should just be a matter of finding the PaperSize object in the
PrinterSettings property's PaperSizes property and assigning it to the
PrintDocument.PaperSize property. e.g.:

System.Drawing.Printing.PrintDocument printDocument = new
System.Drawing.Printing.PrintDocument();
System.Drawing.Printing.PageSettings pageSettings = new
System.Drawing.Printing.PageSettings();
// ...
foreach (System.Drawing.Printing.PaperSize paperSize in
printDocument.PrinterSettings.PaperSizes)
{
if (paperSize.PaperName == "A4")
{
pageSettings.PaperSize = paperSize;
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top