Error converting xls to pdf

Hi,
I’m testing the new version of Aspose Cells for java,
in order to convert an xls (or xlsx) document to pdf, but I have some troubles.



This is the java code:



Workbook workbook = new Workbook();

workbook.open(“input\xls1.xls”);

workbook.save(“output\xls1.xml”, FileFormatType.ASPOSE_PDF);



Pdf pdf1 = new Pdf();

pdf1.bindXML(“output\xls1.xml”, null);

pdf1.save(“output\xls1.pdf”);




I’m getting this error:



java.lang.Exception: PageHeight is: 84168.0 PageWidth is: 59544.0. The

minimum allowed page size is 3 by 3 units (approximately 0.04 by 0.04
inch);

the maximum is 14,400 by 14,400 units (200 by 200 inches).

at aspose.pdf.xml.L.a(SourceFile:602)

at aspose.pdf.xml.n.a(SourceFile:732)

at aspose.pdf.xml.P.a(SourceFile:105)

at aspose.pdf.xml.w.a(SourceFile:112)

at aspose.pdf.Pdf.save(SourceFile:911)





I understand that the problem is connected to the size of pdf pages.

But if I use a previous version of Aspose.Cells, for example the one of

12/2/2010, everything goes right.

Can you help me?

Thanks & Regards,
Sandra

Hi,

Could you post your template xls file here, we will check it soon.

The error looks to be concerned with Aspose.Pdf product. Anyways, we will soon find out. Which Aspose.Cells and Aspose.Pdf version you were using before that work fine and which versions you are using now?

Thank you.

Hi,

I’ve attached the xls file.

Now I’m using Aspose.Cells 2.2.1 and Aspose.Pdf 2.6.0
The code works fine with Aspose.Cells 2.1.2 and Aspose.Pdf 2.5.0

Thanks for your answer,
Sandra

Hi,

I have tested your case using latest fix i.e…, Aspose.Cells for Java v2.2.1.3 (attached) and Aspose.Pdf for Java v2.5, it works fine. If it is not working with Aspose.Pdf for Java v2.6 then it might be an issue with Aspose.Pdf for Java v2.6


Thank you.

Hi,

Unfortunately I haven’t solved my problem. I used Aspose.Cells for Java v2.2.1.3 and Aspose.Pdf for Java v2.5, but it don’t works.

I’m getting this error:

java.lang.Exception: PageHeight is: 84168.0 PageWidth is: 59544.0. The minimum allowed page size is 3 by 3 units (approximately 0.04 by 0.04 inch); the maximum is 14,400 by 14,400 units (200 by 200 inches).
at aspose.pdf.e.bp.if(Unknown Source)
at aspose.pdf.e.a1.a(Unknown Source)
at aspose.pdf.e.bf.a(Unknown Source)
at aspose.pdf.e.ap.a(Unknown Source)
at aspose.pdf.Pdf.save(Unknown Source)

What can I do?

Thanks,
Sandra

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I checked your file with Aspose.Cells V2.2.1.3 and Aspose.Pdf V2.6 (latest) and it works fine. Please try the latest version of Aspose.Pdf and check if it works fine for you too.

Thank You & Best Regards,

Hi,



Fortunately I found the error.

My system setting (Italian), uses the character “,” instead of the
English character “.”, and so the ranges of the page dimension aren’t
correct.



How can I set the localization?



Thanks,

Sandra

Hi,

We have logged your issue into our issue tracking system with an issue id: CELLSJAVA-17182. Once we sorted out, we will let you know about it.

Thank you.

Hi,

Please try the attached version, we have fixed your mentioned issue.

Thank you.

Hi,

I’ve just tried the new attached version and it works fine.

Thanks for the support.
Sandra

The issues you have found earlier (filed as 17182) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.