25 Mar 2009 @ 9:14 PM 

Open your xps file or generate it to a memory stream.

private MemoryStream XPSFile;
private const string pack = "pack://temp.xps";
private Uri uri = new Uri(pack);

var pkg = Package.Open(XPSFile, FileMode.OpenOrCreate, FileAccess.ReadWrite);
PackageStore.AddPackage(uri, pkg);
var doc = new XpsDocument(pkg, CompressionOption.SuperFast, pack);

Now you have an xps document in memory. You can set it to view in the document viewer, or print it off, or what else you can think of.

Posted By: boyd21
Last Edit: 20 Jun 2009 @ 08:16 AM

EmailPermalink
Tags
Tags: ,
Categories: .Net, Hardware Maintenance, Programming


 

Responses to this post » (None)

 
Tags
Comment Meta:
RSS Feed for comments

 Last 50 Posts
Change Theme...
  • Users » 3
  • Posts/Pages » 30
  • Comments » 0
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

GeekPub



    No Child Pages.