eliminating page break from XPS print
I've tried several ways to eliminate the page break since I'm printing
on a small receipt printer with a continuous paper feed, but I still get
a 1/2 cm or so break. My basic print code looks like this...
FlowDocument doc = <passed in FlowDocument>
PrintDocumentImageableArea ia = null;
XpsDocumentWriter docWriter = PrintQueue.CreateXpsDocumentWriter(ref ia);
doc.PagePadding = new Thickness(0, 0, 0, 0);
DocumentPaginator paginator =
((IDocumentPaginatorSource)doc).DocumentPaginator;
paginator.PageSize = new Size(ia.MediaSizeWidth, ia.MediaSizeHeight);
docWriter.Write(paginator);
I've tried the following...
Setting doc.PagePadding to new Thickness(0, 0, 0, 0). This almost does
it but the 1/2 cm is still there.
Setting the PageHeight of both the paginator and the flow doc to large
values and re-computing the page count. No matter how I do this it only
prints oart of the document. Once it gets to where a pgae break would
be, it stops.
date: Fri, 09 Nov 2007 09:25:22 -0600
author: Scott Walters