Imports Microsoft.VisualBasic
Imports System
Imports DevExpress.Xpf.Printing
Imports DevExpress.XtraReports.UI
Imports Microsoft.Win32
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports DevExpress.XtraPrinting
Imports DevExpress.Xpf.Printing.PreviewControl
Imports System.IO
Imports DevExpress.XtraPrinting.Native.ExportOptionsControllers
Public Class tsDocumentPreviewControl
    Inherits DocumentPreviewControl

 
    Public Overrides Sub Save()

        Dim sfd As New SaveFileDialog
        sfd.FileName = MyBase.Document.DefaultFileName
        sfd.Filter = "Archivo pdf|*.pdf"
        sfd.DefaultExt = ".pdf"
        If sfd.ShowDialog Then            
            Dim optionsModel = ExportOptionsViewModel.Create(Document.PrintingSystem, ExportFormat.Pdf)
            optionsModel.FileName = sfd.FileName
            optionsModel.OpenFileAfterExport = True
            MyBase.Export(optionsModel)
        End If

    End Sub

  

End Class
