I have an issue with that code,
XpsDocument doc = new XpsDocument(_filePath, FileAccess.Read);
XpsDocument = doc.GetFixedDocumentSequence();
...
var writer = PrintQueue.CreateXpsDocumentWriter(pq);
var paginator = XpsDocument.DocumentPaginator;
writer.WritingCancelled += WriterOnWritingCancelled;
writer.WritingCompleted += WriterOnWritingCompleted;
writer.WritingPrintTicketRequired += WriterOnWritingPrintTicketRequired;
writer.WriteAsync(paginator);
If I replace the last Ligne with Write(paginator) everything is ok, but if I use the write async I get a,
FixedPage cannot contain another FixedPage.
error in WriterOnWritingCompleted
;
I found that article. But I don't really know how to deal with that overload.
You could try this code:
And check that you create fixedDocument in the right way, like: