I’m saving an ODS file to XML and binding the XML file into a PDF via Pdf.BindXML() method. However, I’m getting a XmlException. The ODS file is attached for sample. The exception is:
Sample code (I have tested the code and it works fine): LoadOptions loadOptions = new LoadOptions(LoadFormat.ODS); Workbook workbook = new Workbook(@“e:\test2\DocCntVer_1110000000157.ods”, loadOptions); workbook.Save(“e:\test2\out_pdf.pdf”, SaveFormat.Pdf);
For your information, we now support to directly convert Excel spreadsheets to PDF without any use of Aspose.Pdf component. Also, FileFormatType.AsposePDF is obsoleted and we do not enhance or improve this file format type any more.
Another option can be you may convert the ODS file to PDF and then use Aspose.Pdf product to add security options to further re-save it.
Yes, Aspose.Words supports loading Word document formats (.DOC, .DOCX, .ODT etc) to PDF. Please see this article here for details. Likewise you can also set persmissions on the output PDF document. You can find further details in the API here.
Please correct me if I have misunderstood your query.