private FileInfo Exporter_PDF()
        {
            DocumentPaginator Doc = MEP.Paginer(_Doc);

            String   Chemin = NomFichier();
            FileInfo F      = null;

            if (PDF.Creer(Doc, Chemin) || File.Exists(Chemin))
            {
                F = new FileInfo(Chemin);
            }

            return(F);
        }
        private void Imprimer()
        {
            DocumentPaginator Doc = MEP.Paginer(_Doc);

            // Create a XpsDocumentWriter object, implicitly opening a Windows common print dialog,
            // and allowing the user to select a printer.

            // get information about the dimensions of the seleted printer+media.
            PrintDocumentImageableArea ia = null;

            System.Windows.Xps.XpsDocumentWriter docWriter = PrintQueue.CreateXpsDocumentWriter(ref ia);

            if (docWriter != null && ia != null)
            {
                docWriter.Write(Doc);
            }
        }
示例#3
0
 public static Boolean Creer(FlowDocument document, String Chemin)
 {
     return(Creer(MEP.Paginer(document), Chemin));
 }