Free Support Forum -

Invalid alignment value: FillJustify

I am considering purchasing .PDF in addition to our .Cells license for converting our Excel reports to PDF. I am getting the following error when trying to use the _pdf.BindXML command. I have tried this same code on simpler XLS documents with no issues.

Invalid alignment value: FillJustify

While I cannot show anyone the report itslef, I was hoping someone could point me in the right direction. The code is pretty simple at this point:

Dim _xls As New Cells.Excel

_xls.Open("C:\Code\DotNet 2005\SalesPackageConverter\SalesPackageConverter\Jan 2006 Sales Package - Operating.xls")

_xls.Save("tmp.xml", Cells.FileFormatType.AsposePdf)

Dim _pdf As New Pdf.Pdf

_pdf.BindXML("tmp.xml", Nothing)


OK - I tracked down the issue. It seems the report designer created a TOC that is in the following format:

Subject ........................................................ 1

Subject2 ....................................................... 2 and so on.

They did this by going into each cell between "subject" and the "page", setting the text to "..", and then the horizontal text alignment to "fill". If I delete these cells, everything works as expected. Quesiton is, is there a work around in the Aspose.PDF control? Getting the report modified will be a challenge in itself. I guess I could do a replacement when I open the spreadhseet in Aspose.Excel, but maybe there is a better workaround?

Can you please attach your excel report here? I will try to fix it in Aspose.Pdf. If you don't want other people see it, please send it to and include a link to this post in it.

OK - I've stripped out most of the worksheets, reduced the data, and modified all the numbers and the company name. I think this should be ok to post.

The Aspose.Cells generates invalid attribute. The name should be "FullJustify" in Aspose.Pdf. I will report this problem to the Aspose.Cells team.

Please try this attached fix.

It now no longer gives that error. Thanks!

But now there is another issue. When I used the _pdf.Save("C:\tmp.pdf") command, it throws a "Invalid index in Cells indexer: 2" error. This is using the sample.xls document posted earlier.



Dear Rob,

I have reproduced this error. We will fix this bug ASAP.

Sorry for this bug in Aspose.Pdf. Please try the attachment.

I am no longer receiving the error - thanks for the quick fix. However, I now have a few more issues.

The formatting is severly modified if I use your Cells & PDF controls to convert the spreadsheet. Please see the attachments for examples. One file is using Adobe Professional to manually convert the file, and the other is using the code posted in the first post of this thread.

Also, there are many blank pages inserted throughout the document, which has quadrupled the size over printing from Excel to Adobe. Is this something that can be fixed, or is it part of the trial license?



Thanks for considering Aspose.

Those issues you mentioned above is caused by Aspose.Cell. I will report them to their team. Sorry for inconvenience.

Hi Rob,

For formatting issues, we will check and fix it soon.

For blank pages, please check "Print Preview" in MS Excel, you can also see many blank pages. Please remove blank data in MS Excel or try to strip out them using Aspose.Pdf.

Has there been any progress on this?

This post has been moved to Aspose.Cell. I think they will give u an exact answer for new progress.

Formatting issue is fixed. Please try the latest version of Aspose.Cells.