public void SaveToXps(string file)
        {
            var pd            = PrintDialog;
            var fixedDocument = CreateDocument(new Size(pd.PrintableAreaWidth, pd.PrintableAreaHeight), new PrintProcessorCollection(this));

            XpsHelper.SaveFixedDocument(fixedDocument, file);
        }
        internal static void PreviewDocument(PrintProcessorCollection ppc)
        {
            var pd = ppc.First().PrintDialog;

            var fixedDocument = CreateDocument(new Size(pd.PrintableAreaWidth, pd.PrintableAreaHeight), ppc);

            XpsHelper.ShowFixedDocument(fixedDocument, ppc.FileName);
        }
        internal static void PreviewDocument(PrintProcessorCollection ppc, IWindowProvider windowsProvider = null)
        {
            if (!ppc.Any())
            {
                return;
            }
            var pd = ppc.First().PrintDialog;

            var fixedDocument = CreateDocument(new Size(pd.PrintableAreaWidth, pd.PrintableAreaHeight), ppc);

            XpsHelper.ShowFixedDocument(fixedDocument, ppc.FileName, windowsProvider);
        }