bhaag
June 30, 2008, 10:08am
1
Hi, I am using the following code to convert XLS to PDF: Workbook wb = new Workbook(); wb.Open(inputFile); //Save the document in Aspose.Pdf.Xml format: wb.Save(“C:\out.xml”, FileFormatType.AsposePdf);
Pdf pdf = new Pdf(); pdf.BindXML(“C:\out.xml”, null); pdf.Save(“C:\out.pdf”); // < Error occurs here But an error occurs: “Unhandled Exception: System.ApplicationException: The reference paragraph for ParagraphRelative positioning is not found:Cell_0_1_0” It seems to be occurring whenever there is a simple Box in the spreadsheet…(see Book2.xls) I am using Aspose.Cells 4.4.3.21, and Aspose.Pdf 3.6.2.0 with .NET framework 2.0.50727…
Hi,
Thanks for considering Aspose.
I have tried converting your provided Book2.xls to pdf using Aspose.Cells v4.4.3.1 & Aspose.Pdf v3.6.2.0, i cannot see any error. Can you please check the value of 'files' that you have provided in BinXML method.
bhaag
June 30, 2008, 9:18pm
3
Sorry about the ‘files’, I had written the wrong code there, I have corrected it… I tried with Aspose.Cells 4.4.3.1 and did not receive the error either, but the problem is that I have to use Aspose.Cells 4.4.3.21 as it contains a fix for another error that I was encountering (Exception "System.ArgumentException: Not a legal OleAut date." occuring when trying to save workbook in AsposePDF format )… I guess this error is popping up when using Aspose.Cells 4.4.3.21 only
Hi,
I will move this thread to Aspose.Cells forum. They will reply to you soon.
Hi,
Please try our latest version(4.5.0.0): http://www.aspose.com/community/files/51/file-format-components/aspose.cells/entry133353.aspx I tested using your template file and it works fine without generating any error.
Thank you.
bhaag
July 4, 2008, 9:57pm
6
Tried with 4.5.0.0 and still getting the same error
Hi,
I don't find any problem, I used Aspose.Cells 4.5 and Aspose.Pdf 3.6.2.5. Atached is the resultant .pdf file, kindly check it. Please make sure that your project is using 4.5. or greater version. If you still could not sort out, make a test project, zip it (containing all the files) and post it here, we will check it soon.
Thank you.
bhaag
July 7, 2008, 8:59pm
8
OK tried with latest version of Aspose.Cells and Aspose.Pdf and it worked out…thanks…