We are having three problems when rendering some content from an XPS
generated from a PDF with PDFNet SDK inside a silverlight viewer.
Problem 1: (Attachments PDF-1.png, XPS-1.png, 1.fpage) A text in a Glyph
XAML element is rendered with Fill="#00000000". This is then interpreted
as transparent and then the text is not shown. In the PDF and XPS the file
seems to be fine, as it can be seen in PDF-1.png and XPS-1.png. The
generated XAML can be seen in 1.fpage.
Problem 2: (Attachments PDF-2.jpg, XPS-2.png, 1.fpage) Some images inside
XML element ImageBrush are generated as TIFF images, which are not supported
by Silverlight. This implies that those images are not rendered in the
silverlight viewer. In the PDF and XPS the file seems to be fine, as it can
be seen in PDF-2.png and XPS-2.png. The generated XAML can be seen in
Problem 3: (Attachments PDF-3.png, XPS-3.png, 25.fpage) Some images are
rendered inside a VisualBrush XAML element, which is not supported by
Silverlight. In the PDF and XPS the file seems to be fine, as it can be seen
in PDF-3.png and XPS-3.png. The generated XAML can be seen in 25.fpage.
Please, let me know if these are known issues, and if you are planning to work on them.
What is the Silverlight XPS viewer that you are using on your end?
If you are using SilverDox
(http://www.pdftron.com/silverdox/samplecode.html) then you should convert PDF to XOD (with pdftron.PDF.Convert.ToXod()) - instead to ToXps(). XOD is essentially a web friendly version of XPS. You can rename XOD to XPS but we prefer to use a different extension so that we know which files are optimized and which not.
If you are using another Silverlight XPS viewer you may want to talk to its developer. The only option we are aware of is firstfloor, however just like SilverDox it does not support full XPS spec. In this case you may be better
off with SilverDox because we can ‘guarantee’ that all XPS features we produce are rendered accurately.
You should be able to view XOD files in SilverDox or WebViewer (which also supports HTML5 and Flash besides Silverlight - http://www.pdftron.com/pdfnet/webviewer/demo.html) without issues.
You can learn more about WebViewer and SilverDox here: