Setting the PaperSize

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pedro Feio

    #1

    Setting the PaperSize

    Hi,

    I'm having a weird problem setting up the paper size in a C# Windows Forms
    Application.
    The code I'm using is something like this:

    PrintDocument pd = new PrintDocument() ;

    pd.DefaultPageS ettings.Margins .Left = 0;
    pd.DefaultPageS ettings.Margins .Right = 0;
    pd.DefaultPageS ettings.Margins .Top = 0;
    pd.DefaultPageS ettings.Margins .Bottom = 0;

    PaperSize pkCustomSize1 = new PaperSize("Firs t custom size", 827, 100);
    pd.DefaultPageS ettings.PaperSi ze = pkCustomSize1; //** This line works...
    pd.PrinterSetti ngs.DefaultPage Settings.PaperS ize = pkCustomSize1; // This
    doesn't...


    What I get after all this, is just an A4 page that is only written on top...
    :-(

    How do I tell my application which size I want the paper to be?

    Thanks in advance,
    Pedro Feio


Working...