How do I prevent the XPSDocumentWriter from rasterizing my VisualBrush?

I am using the following code to create an XPS document from a FixedDocument.

using (XpsDocument doc = new XpsDocument(package,CompressionOption.NotCompressed))
{
  XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(doc);
  xpsWriter.Write(fixedDocument);
  doc.Close();
}

      

This works well, except for one case where I have a filled path that is filled with a tiled art, which it sometimes rasterizes it and creates an ImageBrush instead of traversing the VisualBrush. Unfortunately, the image it creates is a terrible representation of VisualBrush. Its resolution is terrible and crazier, it doesn't even fill the original path!

I've done a ton of digging but couldn't find a setting that prevents rasterization.

Any suggestions?

+3


source to share





All Articles