Forums

Custom Paper Size on Run Time

Last post 1/23/2008 8:41 PM by Rusdy RIP. 4 replies.
Sort Posts: Previous Next
  • Rusdy RIP

    Custom Paper Size on Run Time

    1/18/2008 4:02 AM
    • Not Ranked
    • Joined on 1/18/2008
    • Posts 5

    hi, i need help on change custom paper

    this is my case

    i create document using printing system

    then i use printcontrol to preview my print

    after i show the printcontrol the document is show,

    but when i change papersize use my button the document doesn't show

    this is my button source code to change the papersize

    Dim MyPaperSize As New System.Drawing.Printing.PaperSize("Custom Paper Size", 500, 550)

    Dim MyMargins As New System.Drawing.Printing.Margins(0, 0, 0, 0)Dim MyPageSettings As New System.Drawing.Printing.PageSettings

    MyPageSettings.PaperSize = MyPaperSize

    MyPageSettings.Margins = MyMargins

    PrintingSystem1.PageSettings.Assign(MyPageSettings)

     pls help me... if i use pagesetup change the paperkind, it's work

    but if use my code to change paper size it doesn't work

     

    thx

  • Alan (DevExpress)

    Re: Custom Paper Size on Run Time

    1/21/2008 5:00 AM
    • Top 10 Contributor
    • Joined on 4/13/2006
    • Posts 2,883

    Hello,

    Sorry, it's too difficult to understand what's going wrong from your description. We need to know your XtraPrinting version number, your printer and operating system details, and most necessary we need to see your test project to reproduce this issue at our side. Could you please submit a bug report to our Support Center at http://www.devexpress.com/sc, attach your project and provide us with all required information? This would be greatly appreciated!

    Also, I suggest that you create an instance of the XtraPageSettings class instead of the standard System.Drawing.Printing.PageSettings one, and set the PaperKind property to Custom, and the PaperName property to the appropriate paper name. For more information, please refer to XtraPageSettings.PaperName Property description.

    Best Regards, Alan.
    R&D, .NET Team.

    P.S. This is a peer-to-peer forum. For technical support, search our knowledge base at http://search.devexpress.com or contact our Support Team directly at http://www.devexpress.com/sc.
  • Rusdy RIP

    Re: Custom Paper Size on Run Time

    1/22/2008 2:52 AM
    • Not Ranked
    • Joined on 1/18/2008
    • Posts 5

    sorry cause my bad english

    i am using dev express 7.2

    i found that the problem is when i make the margin paper smaller

    ex : the first margin left and right width is 25

          then i drag the margin to position 100

         after i drag the margin the document can't generate ,it show blank page

        if i drag margin top and botton , it don't have the problem

    this is my sample project

    http://rapidshare.com/files/85634524/WindowsApplication1.rar.html

     

     

  • Alan (DevExpress)

    Re: Custom Paper Size on Run Time

    1/23/2008 9:49 AM
    • Top 10 Contributor
    • Joined on 4/13/2006
    • Posts 2,883

    Hello,

    Thank you for your test project. I've investigated it, and it turns out that the problem is in the following code:
    Dim brick As PageCustomBrick = lembar.DrawPageInfo(PageInfo.NumberOfTotal, "Hal {0} dari {1}", Color.Black, New RectangleF(0, 0, 750, 20), BorderSide.All)

    The reason is that the specified brick's width (750) is too large to be represented on a page. If you try to decrease this width (e.g. set it to 150), or comment this code, everything will work fine.

    Does this help you?

    Best Regards, Alan.
    R&D, .NET Team.

    P.S. This is a peer-to-peer forum. For technical support, search our knowledge base at http://search.devexpress.com or contact our Support Team directly at http://www.devexpress.com/sc.
  • Rusdy RIP

    Re: Custom Paper Size on Run Time

    1/23/2008 8:41 PM
    • Not Ranked
    • Joined on 1/18/2008
    • Posts 5

    thank you,

    it works perfectly

    Yes

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.