Xml (Word) To Pdf

Hello,

I have create a document Xml with Microsoft Word

Then I use this code
Dim file As String = Request.PhysicalApplicationPath & "Editeur\Assurable.xml"
Dim pdf As Pdf = New Pdf
pdf.BindXML(file, Nothing)
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
pdf.Save(Response.OutputStream)
Response.End()

Then Acrobat Reader say "A reference to an object is incorrect"

What should I do?

Thank you for the answer

Dear cadouin,

Thanks for you consideration.

Would you please post your XML file here or email it to me? I will test it and reply to you.

Thanks!

The file xml was sent to the address email pdf@aspose.com

It is about a word document converted to the format xml .

a+

Dear eservizes,

Thanks for your consideration.

You can’t use the xml file generated from Microsoft Word directly in Aspose.Pdf.
In order to generate pdf file from your xml, you can:

  1. write a program to convert the xml to new xml file which fit the Aspose.Pdf format(certainly it’s a difficult work); Please view thread HTML to Aspose.Pdf.

  2. use xslt file. Please view thread [XML as DataSource] (http://forums.aspose.com/ShowPost.aspx?PostID=833).

Hi,

Aspose.Word 1.6 can now be used together with Aspose.Pdf to convert DOC files to PDF.