Lighting up the XML Paper Specification [Proof-of-concept XPS reader for Silverlight!]


This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

SimpleSilverlightXpsViewer.png

Comments (45)
  1. Delay started out poking around in the XPS document format. Before he could stop himself, he had an XPS

  2. Adrian Ford says:

    Delay has a great proof-of-concept example that shows how a simple XPS viewer can be implemented in Silverlight

  3. David Anson has created an XPS viewer using the Silverlight 1.1 Alpha. This app is a very cool idea and

  4. Wictor Wilen says:

    Delay has done it – a Silverlight "proof-of-concept" XPS viewer! Head over to his post and try it out, this might be the start of the cross-platform XPS viewer that we all long for…

  5. neuhawk says:

    Delay 发布了一个SimpleSilverlightXpsViewer 小软件

  6. WynApse says:

    Silverlight Cream for May 23, 2007

  7. Synergist says:

    I have been working with XML for most of my career, from developing a CAD application to my roles at

  8. Silverlight news – May 24, 2007

  9. Well this week was a nice rest, most of it spent relaxing with my wife. So it was a non-coding week but

  10. On Monday I gave an overview talk called "A Lap Around Silverlight" at TechEd in Orlando. You can download

  11. לאט לאט עולים יותר הדגמות וחומרים על Silvelight, הנה כמה דברים מעניינים: מימוש של גרפים ב Silverlight

  12. veeral says:

    G’day,

    I have been playing with XPS/Silverlight for a few days. I have noticed the sample XPS document you have provided with your sample code contains several ottdf file. How do you generate such a file ? My understanding is that  font data is included within the XPS file unless i am incorrect.

    Another question for you is that if I used the Save As XPS option within Office 2007 within the XPS package there is a file FixedDoc.fdoc under Documents1. Whereas if I used the XPS printer driver the file is FixedDocument.fdoc.

    Why is there a difference ? In your code you are referring to FixedDocument.fdoc.

    thanks

    Veeral

  13. veeral says:

    sorry mate i reread your post above regarding the ottdf file. Its included within Documents1ResourcesFonts path.

    Still interested in the fixeddoc.fdoc and fixeddocument.fdoc issue.

  14. David Anson says:

    veeral,

    Regarding the internal XPS file structure difference between documents generated by the XPS Printer Driver vs. Office, that’s something I was aware of [and touched on with my second bullet point about not setting out to write a full XPS parser 🙂 ]. Like the difference you cite, the differences I’ve seen so far have seemed pretty minor and I suspect that both variants are fully valid XPS files according to the spec. I just happened to focus my efforts on the XPS Printer Driver variant (and knew I controlled the sample data), so that’s what the sample code currently assumes. I think it would be relatively straightforward to support the Office variant, too, but that was somewhat tangential to my goal of proving the concept of an XPS viewer in Silverlight.

    Hope that explains things!

  15. veeral says:

    thanks for the feedback. It makes sense after a good sleep.

    I have been reading the XPS specification and the spec states that the actual name of the file with the extension fdoc can be anything as long as the long as the other aspects of the part naming conventions are adhered to. Just read up on section 2.2 and S2.25.

    Now I got to spend a bit more time with the XAML syntaxes between the two platforms.

    You guys pump out so many new things so quickly its hard for me to keep abreast with everything. 😀

    What amazes me is how you managed to write this app and the ms surface app so quickly. I guess you have access to the team and internal resources. I really do envy you alot. 🙂

    thanks for your help.

    veeral

  16. Delay's Blog says:

    With today’s release of the Silverlight 1.0 RC and 1.1 Refresh , I’ve updated the Silverlight samples

  17. With today's release of the Silverlight 1.0 RC and 1.1 Refresh , I've updated the Silverlight

  18. Delay מפרט את השלבים שהוא עשה כדי לעשות Upgrade לכמה דברים שהוא כתב ב Silverlight 1.1. בינהם ה Air Lines

  19. cesarzam says:

    Cool tool, I wonder if I can use this in my project, I am using Windows 2003, VS.NET c# ASP.net. I am plannig to convert all documents to .XPS and use the XPS viewer to view document overt the interner. Any Suggestions?

    All my web application was coded in ASP.net,C#, Windows 2003. It is too late for me to change to Vista for the monent.

  20. David Anson says:

    cesarzam,

    You could use something like my demo application or just rely on the native .XPS viewing that comes with .NET 3.0. It’s my understanding that Vista is not a requirement for XPS viewing. You can find more details here: http://www.microsoft.com/whdc/xps/default.mspx

    Thanks and good luck!

  21. Bardzo mi się podoba fakt, że niektóre technologie kojarzone jako "produkty" bardzo odrębnie, ze względu

  22. Bardzo mi się podoba fakt, że niektóre technologie kojarzone jako "produkty" bardzo odrębnie

  23. SocialITy says:

    Dla porządku nieco wstępu teoretycznego – XPS ( XML Paper Specification ) to jeden z nowych formatów

  24. Интересное приложение, созданное с использованием Silverlight, опубликовано в Delay’s Blog . Приложение

  25. Интересное приложение, созданное с использованием Silverlight, опубликовано в De

  26. works guo says:

    这是一篇关于基于Silverlight 1.1 alpha 的XPS查看器,现在微软还没有官方的基于Silverlight的 XPS 查看器,但这位开发者是非Silverlight 团队的,他制作一个可以很好的查看XPS文档的查看器而且还有源代码下载,虽然能使用但是有一些问题(在文中会谈到).

  27. Postanowiłem wziąść udział w konkursie Silverlighta (SL). Długo szukalem tematu. Po akademicku zacząłem

  28. David Anson has created an XPS viewer using the Silverlight 1.1 Alpha. This app is a very cool idea and

  29. Delay's Blog says:

    After a few customer requests to update my SimpleSilverlightXpsViewer proof-of-concept XPS reader for

  30. Windows Vistaに伴って、いろいろと新しいMSのアーキテクチャが導入さ…

  31. Delay's Blog says:

    Earlier this week I was asked about an update to my SimpleSilverlightXpsViewer sample for the newly released

  32. Delay's Blog says:

    Since the public release of Microsoft Silverlight 2 , I’ve gotten a few internal and external requests

  33. dotfun says:

    LightinguptheXMLPaperSpecification[Proof-of-conceptXPSreaderforSilverlight!]Sincegetting…

  34. Rimbi_Soumen says:

    Please help in the following:

    1. How the Silverlight2.dll for  Silverlight2.xps is generated.

    2. I can see a project with name Silverlight2. What kind of project is that ?

    (I mean I found there is a project for every XPS document)

    3. StreamResourceInfo streamInfo = Application.GetResourceStream(new StreamResourceInfo(e.Result, "application/binary"), new Uri(source, UriKind.Relative));

    Here I get the error. That is If I have a MyXPS.XPS, the MyXPS.dll is not found which throws object not instantiated exception.

    Soumen, India

  35. David Anson says:

    Soumen,

    I’m afraid I don’t understand most of what you’re asking. But maybe you want to start with one of the following two links which point to Silverlight 2 versions of the XPS Viewer:

    http://blogs.msdn.com/delay/archive/2008/10/18/roadblock-in-the-way-of-migrating-the-proof-of-concept-silverlight-xps-reader-simplesilverlightxpsviewer-sample-does-not-work-on-silverlight-2-rtw.aspx

    http://firstfloorsoftware.com/blog/xps-in-silverlight-revisited/

    Hope this helps!

  36. Rimbi_Soumen says:

    Say for example, I have an XPS Document named “MyPPTSlide.xps” that I want to display in Silverlight-2 application. I need to know what are the steps involves in this regard.  What I do is as below:

    1. Create a Silverlight 2 application using VWD 2008.

    2. Use the SimpleSilverlightXpsViewer.xap made by you in the HTML page as

    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">

    <param name="source" value="ClientBin/SimpleSilverlightXpsViewer.xap"/> <param name="initParams" value="xpsDocument=MyPPTSlide.xps" />

    3. Unknown

    Here I need to know what are the other tasks I need to do to display the MyPPTSlide.xps into the the html page. This might involve creating a separate project for the XPS document, creating fonts etc. I am stuck after step 2 and want to continue from step 3.

    Thanks in advance!

    Soumen, India

  37. David Anson says:

    Soumen,

    The way the sample works is that references to the three samples are directly in the code which tells it where to look for them. Your proposal to use initParams to pass something in is a good one, but was unnecessary for the proof-of-concept I was working on. If you’d like to change the code to support that feature, I’d encourage you to do so because it seems like a nice thing to have. But the code I wrote was specifically not trying to support that general scenario.

    For what it’s worth, if you want something quick and easy to start with, you can rename your XPS document to Intro.xps, replace the contents of the Intro sample with your document and files, and see where that gets you. 🙂

    Hope this helps!

  38. Rimbi_Soumen says:

    Thanks for the prompt reply but unfortunately the idea did not work for me. However could you please tell me what this line means for:

    ConvertPartName("/Documents/1/FixedDocument.fdoc");

    Where this FixedDocument.fdoc locates? The code says its a relative Uri.

    Soumen

  39. David Anson says:

    Soumen,

    That has to do with the internal structure of the XPS document. You’ll probably want to read the XPS specification if you’re going to be doing much with XPS documents. Thanks!

  40. I’ve recently been involved on a project that has a requirement to create and view XPS documents in Silverlight.&#160;

  41. re: [Silverlight] Silverlight2での大量テキストの表示

  42. [Silverlight] Silverlight2での大量テキストの表示(XPS編)

  43. johnwalter says:

    Thanks for this nice tutorial.But I've been used  http://www.fileviewpro.com/…/file-extension-tif

Comments are closed.