Custom size paper problem

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

    #1

    Custom size paper problem

    Hi,
    I am tring to change the paper size from default to custom paper size.
    In print preview its showing my custom size but when I print it print
    on default paper size.
    Can any one help me to figure out this?
    I am using following code:
    Dim customPaperSize As New PaperSize("11x9 ", 1100, 900)

    pdMain.DefaultP ageSettings.Pap erSize = customPaperSize

    'pdmain is Friend WithEvents pdMain As
    System.Drawing. Printing.PrintD ocument

    Thanks in advance
    Sukh

  • Peter Proost

    #2
    Re: Custom size paper problem

    Hi, the custom paper size has to be supported by the printer. The
    'PrinterSetting s' provide a
    'PaperSizes' property that contains all paper sizes supported by the
    printer.

    Hope this helps

    Greetz Peter

    --
    Programming today is a race between software engineers striving to build
    bigger and better idiot-proof programs, and the Universe trying to produce
    bigger and better idiots. So far, the Universe is winning. (Rich Cook)

    "Sukh" <sukhsinghin@gm ail.com> schreef in bericht
    news:1140789891 .181750.238110@ e56g2000cwe.goo glegroups.com.. .[color=blue]
    > Hi,
    > I am tring to change the paper size from default to custom paper size.
    > In print preview its showing my custom size but when I print it print
    > on default paper size.
    > Can any one help me to figure out this?
    > I am using following code:
    > Dim customPaperSize As New PaperSize("11x9 ", 1100, 900)
    >
    > pdMain.DefaultP ageSettings.Pap erSize = customPaperSize
    >
    > 'pdmain is Friend WithEvents pdMain As
    > System.Drawing. Printing.PrintD ocument
    >
    > Thanks in advance
    > Sukh
    >[/color]


    Comment

    • Sukh

      #3
      Re: Custom size paper problem

      Thanks Peter but PrinterSettings .PaperSizes is ReadOnly Property.
      :(

      any other way :
      Sukh

      Comment

      • Peter

        #4
        Re: Custom size paper problem

        Hi, I know but it shows the papersizes supported buy the printer, so you can
        check if your papersize is supported

        Greetz Peter
        "Sukh" <sukhsinghin@gm ail.com> schreef in bericht
        news:1140833962 .019939.20490@t 39g2000cwt.goog legroups.com...[color=blue]
        > Thanks Peter but PrinterSettings .PaperSizes is ReadOnly Property.
        > :(
        >
        > any other way :
        > Sukh
        >[/color]


        Comment

        • Sukh

          #5
          Re: Custom size paper problem

          Hi Peter,
          Thanks for your response. I fixed that issue using custom paper size
          but now stuck with another problem
          I am stuck with a problem Can anyone help me out from this...

          I am printing a report on pre-printed continue paper using dot-matrix
          printer using vb.net and paper size is my created custom page size

          on first page Data is printing on all the correct locations. But
          After printing first page it increase paper 3cm vertically/Height so on

          second
          page actual data goes down by 3 cm, So each time it increase 3 cm mean
          on second page its 6cm and on 3rd page 9cm so on.... So After printing
          the
          first page on correct locations , data goes on different locations
          which is complete mess.

          please give any suggestion or any idea.

          I am creating my own custom size page and setting the same for
          printing.


          Thanks
          Sukh

          Comment

          Working...