2, when memory rose to about 1 g, would be an error of "open file" C: \ WINDOWS \ FONTS \ SIMSUN TTC "I/O error,"
3, online said GC. Collect (); SetProcessWorkingSetSize EmptyWorkingSet are not make
var xpSfile=the string. Format (" {0}. XPS, Guid. NewGuid (), ToString ());
Var paginator=((IDocumentPaginatorSource) preview. The Document). DocumentPaginator;
Using (var xpsDoc=new XpsDocument [xpSfile, FileAccess ReadWrite, CompressionOption. Maximum))
{
Using (var XPP=new XpsPackagingPolicy (xpsDoc))
{
Using (var RSM=new XpsSerializationManager (XPP, false))
{
The RSM. SaveAsXaml (paginator);
Rsm.Com MIT ();
XpsDoc. Close ();
}
}
}