Home Forums WPF controls Xceed DataGrid for WPF Printing default page size A4

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #41226 |

    Hi!

    Really need to know how to show a print preview with a default paper size chosen as A4

    I’m having a datagrid and showing a print preview

                datagrid.ShowPrintPreviewWindow(title,

                    true,

                    null,

                    true,

                    new Size(500, 700),

                    size); 

    Is it possible to set A4 as a default paper size? 

    Thanks 

    Imported from legacy forums. Posted by Anastasia (had 650 views)

    Fawzi [Xceed]
    Member
    Post count: 722
    Hi Anastasia,
    You could use the last parameter of the ShowPrintPreviewWindow to determine the page size. You could refer to the following link on our documentation center for further details, regarding this method, at:
    indow.html
    You could also refer to the “Printing Sample Application”, which comes along with the Xceed package, as an example on how to customize printing. The sample should be installed at the following path on your computer, by default:
    C:\Xceed Samples\Xceed DataGrid for WPF Professional Edition v5.3\CSharp\Printing

    Imported from legacy forums. Posted by Fawzi [Xceed] (had 297 views)

    User (Old forums)
    Member
    Post count: 23064

    Was setting this parameter to different values, using various dpi values.

    At the end set the default paper size for the printer in the control panel and this worked. Can’t make all users to do this, but at least I found the way to do this.

    And the default value used as in the combobox Size size = new Size(793.70, 1122.52); that would be 96 dpi. Don’t know if it’s actually working. Would be much more helpful and straightforward if there was something like dataGrid.PrintPreview.PaperSize = someEnumWithAllPaperSizes.A4;

    Anyway thanks for your reply

    Imported from legacy forums. Posted by Anastasia (had 169 views)

    Fawzi [Xceed]
    Member
    Post count: 722

    Hi Anastasia,

     

    I have open a feature request to add PageSize enum to the PreviewPrint class. We will notify you by email as soon as it becomes available for download. Thank you for bringing this to our attention. 

    Imported from legacy forums. Posted by Fawzi [Xceed] (had 633 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    The following feature was added in the latest version:

    “It is now possible to set different page settings through a PrintTicket when calling the Print or PrintPreview methods.”

    Download Link: http://forums.xceed.com/latest-xceed-toolkit-plus-for-wpf

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.