简体   繁体   English

用Aspose.Pdf文件转换Excel(.xml)文件PDF

[英]Convert Excel (.xml) file with Aspose.Pdf file PDF

I'm using the CarlosAg.ExcelXmlWriter API and the Aspose.Pdf API. 我正在使用CarlosAg.ExcelXmlWriter API和Aspose.Pdf API。 As I'm using the .xml file that CarlosAg.ExcelXmlWriter API created and using it to creat a .pdf file with the Aspose.Pdf API I'm getting a blank .pdf file with no data in it except the Aspose watermark.. 当我使用CarlosAg.ExcelXmlWriter API创建的.xml文件,并使用它通过Aspose.Pdf API创建.pdf文件时,我得到的是空白的.pdf文件,除了Aspose水印外,其中没有任何数据。

It's seems that Aspose PDF is not recognizing the tags in CarlosAg.ExcelXmlWriter.xml so when using Aspose.Pdf the .pdf file is not populated with any data. 似乎Aspose PDF无法识别CarlosAg.ExcelXmlWriter.xml中的标签,因此在使用Aspose.Pdf时.pdf文件不会填充任何数据。

I've checked the Aspose.Pdf API documents and forum but I didn't see anything that they mentioned about Aspose .Pdf API is able to convert any .xml file to PDF.. 我已经检查了Aspose.Pdf API文档和论坛,但没有看到他们提到的有关Aspose .Pdf API能够将任何.xml文件转换为PDF的任何内容。

My name is Nayyer and I am Support Developer / Technical Evangelist at Aspose. 我叫Nayyer,我是Aspose的支持开发人员/技术布道者。

Aspose.Pdf for .NET is supports the feature to convert XML files into PDF format but the source XML file must be according to Document Object Model of Aspose.Pdf for .NET. 用于.NET的Aspose.Pdf支持将XML文件转换为PDF格式的功能,但是源XML文件必须符合用于.NET的Aspose.Pdf的文档对象模型 The reason you are not seeing anything in resultant PDF, is because the XML schema is not compliance to Aspose.Pdf DOM. 在生成的PDF中看不到任何内容的原因是因为XML模式不符合Aspose.Pdf DOM。 If you prefer to use the XML generated with CarlosAg.ExcelXmlWriter API, you may try using XSLT to make the source XML file compatible with Aspose.Pdf.Generator DOM. 如果您更喜欢使用通过CarlosAg.ExcelXmlWriter API生成的XML,则可以尝试使用XSLT使源XML文件与Aspose.Pdf.Generator DOM兼容。

You may check the following links for further details on Introduction to XML Technologies . 您可以检查以下链接, 以获取有关XML技术简介的更多详细信息。

PS, If the XML file is compliant with Open Office XML format, then you can simply use Aspose.Cells for .NET instead of Aspose.Pdf for .NET to render this file into PDF format. PS,如果XML文件符合Open Office XML格式,则可以简单地使用Aspose.Cells for .NET而不是Aspose.Pdf for .NET将此文件呈现为PDF格式。 You may check the following link for more information on File Formats supported by Aspose.Cells for .NET . 您可以检查以下链接,以获取有关Aspose.Cells for .NET支持的文件格式的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM