I have:
DocumentPaginator dp = ((IDocumentPaginatorSource)document).DocumentPaginator;
and:
FlowDocument document = new FlowDocument();
// create a flow document...
How do a convert the FlowDocument to a FixedDocument using the DocumentPaginator? I can't seem to find out how to do this. All sites I looked at use XpsWriter as in:
XpsDocumentWriter writer = XpsDocument.CreateXpsDocumentWriter(xpsDoc);
DocumentPaginator dp = ((IDocumentPaginatorSource)document).DocumentPaginator;
writer.Write(dp);
I could write the XPS and then get back the FixedDocument but there must be a better way?
No, there doesn't seem to be a better way. But you don't need to save it to disk: