Hi,
We are sending the file not to XPS but to a production printer (Printronix line printer). You can take my word that the file grows in the spooler to the abnormal size of 21mb (i'm using the atached file). I know that microsoft has a problem printing documents using the spooler (see article http://support.microsoft.com/kb/919543). However other products do keep the size of the printfile within an acceptable range.
I don’t understand exactly what you mean with the print dialog. We print without dialog.
We basically use the following code:
PdfViewer
viewer = new PdfViewer();
System.Drawing.Printing.
PrinterSettings ps = new System.Drawing.Printing.PrinterSettings();
System.Drawing.Printing.
PageSettings pgs = new System.Drawing.Printing.PageSettings();
System.Drawing.Printing.
PrintDocument prtdoc = new System.Drawing.Printing.PrintDocument();
viewer.BindPdf(printstream);
//set attributes for printing
viewer.PrinterJobName = DocName;
viewer.AutoResize =
false; //print the file with adjusted size
viewer.AutoRotate =
false; //print the file with adjusted rotation
viewer.PrintPageDialog =
false; //do not produce the page number dialog when printing
CurrentPrinter.SetPrinterSettings(
ref viewer, ref ps, ref pgs, ref prtdoc);
Task
taskPrint = Task.Factory.StartNew(() => viewer.PrintLargePdf(PDFContent,pgs, ps));
taskPrint.Wait(
DRData.printwait); //Wait for x minutes