Convert Word document to PDF and display it in Silverlight

Hi,

In our application, we are converting Word document to PDF format using Aspose.Word and after conveting that file I want to display that PDF file in my Silverlight application. So is it posible using Aspose.Word?

Hi

Thanks for your inquiry. In order to render Word documents in Silverlight, Document Toolkit requires the document to be converted to the XPS format first. So in this case, using Aspose.Words, you can generate document preview using XPS. You can find an example here:
https://blog.aspose.com/2009/08/14/render-doc-ooxml-odt-rtf-and-html-documents-in-silverlight/

Best regards,

Hi,

We have used Document Toolkit and Document Toolkit Extensions (http://documenttoolkit.codeplex.com) to display PDF documents in Silverlight. This works well for PDFs generated by MS Word 2010. However, PDFs generated from a doc or docx source by Aspose.Words are rendered as a series of blank pages, but show fine in Foxit Reader.

Is this a known issue?

Best regards,

Hi

Thanks for your request. Could you please attach few of your input MS Word documents and PDFs. We will check the issue and provide you more information.

Best regards,

Hi,

I’ve attached some input and output documents. After inquiring about this on the Silverlight Document Toolkit discussion page as well (http://documenttoolkit.codeplex.com/discussions/349319#post813197), I tried to generate the PDF (Source2-output.pdf) with EmbedFullFonts = true. This causes the PDF to be displayed in SDT, however the text is very jumbled.

Best regards,

Christian

Hi Christian,

Thank you for inquiry. First off, please try to use the latest version at your end and see if it resolves your issue. Moreover, I did not observe this problem on my end. I have attached output PDF files for your reference.

In case of any ambiguity, please let me know.

Hi Imran,

Thanks for your reply.

I might not have been entirely clear about what my problem with the output PDF from Aspose is. They render correctly in standalone PDF readers such as Adobe Acrobat and Foxit. However, when I try to display them in a Silverlight application using Silverlight Document Toolkit, the PDF generated by Aspose is not displayed correctly, whereas one generated by Word is. I have tried to regenerate the PDF-documents with Aspose.Words 11.2.0, unfortunately the problem persists. XPS from both Aspose and Word display fine.

So my question is whether this is an Aspose-issue or something else. For your reference, I have included a small Silverilght solution, that illustrates the problem. You should be able to run it by starting the Aspose.SDT.PdfTest.Web project from Visual Studio or open .\Aspose.SDT.PdfTest.Web\Aspose.SDT.PdfTestTestPage.html directly in a browser.

Best regards,

Christian

Hi Christian,

Thanks for your inquiry. We have a demo which shows how to render a document and view it in Silverlight here. Moreover, please follow up the thread:
https://forum.aspose.com/t/70905