Free Support Forum - aspose.com

Double underline is not working for 17.12.8.0

Double underline is not working for 17.12.8.0 and its working for 8.9.2.0 aspose sample.zip (57.4 KB)

@sreeraj_05,

Thanks for the template file and output PDF.

Please try our latest version/fix: Aspose.Cells for .NET v18.6:

I have tested rendering your template file to PDF and it works better. If you still find the issue with v18.6.0, kindly do provide some screenshots to highlight the problematic areas comparing output PDF Vs template Excel file, we will check it soon.

New version not resolved my issue please see the attachment

Issue.png (20.3 KB)

@sreeraj_05,

Thanks for the screenshot.

After an initial test, I am able to observe the issue as you mentioned. I found that double underline length for some words is not correct in MS Excel to PDF conversion. I have logged a ticket with an id “CELLSNET-46187” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

1 Like

@sreeraj_05,

Please try our latest version/fix: Aspose.Cells for .NET v18.6.1:

Your issue should be fixed in it.

Let us know your feedback.

1 Like

Hi Amjad,

It was worked in latest version could you please check other format like Single Accounting and Double Accounting629d274e-deeb-4369-9530-a50d6862c855.pdf (53.7 KB)
See attached file

@sreeraj_05,

Thanks for the PDF file.

I tested and checked and “Single Accounting and Double Accounting” is also working fine, see the output PDF file attached. Do you use some other template file, if so, kindly attach the template Excel file here, we will check it soon.
out1.pdf (51.3 KB)

Could you please check the length of both line is lesser than the text

image.png (4.2 KB)
See the image this was worked in older versions

@sreeraj_05,

Thanks for the screenshot.

This is not an issue rather Aspose.Cells follows MS Excel standards and specifications when rendering to PDF file format. Please see the screenshot which shows the output is same as per the print preview of MS Excel for the sheet:

It is quite possible that older versions has this drawback where the Aspose.Cells output was not identical to the print preview of MS Excel.

Is there any code fix for the same .

@sreeraj_05,

Well, you may try to change the underline style from Single/Double Accounting to Single/Double.
e.g
Sample code:

    Workbook wb = new Workbook(srcFile);

    Console.WriteLine(wb.Worksheets[0].Cells["H7"].GetStyle().Font.Underline);
    Console.WriteLine(wb.Worksheets[0].Cells["H8"].GetStyle().Font.Underline);

    int styleCount = wb.CountOfStylesInPool;
    for (int i = 0; i < styleCount; i++)
    {
        Style style = wb.GetStyleInPool(i);
        if (style.Font != null)
        {
            if (style.Font.Underline == FontUnderlineType.Accounting)
            {
                style.Font.Underline = FontUnderlineType.Single;
            }
            else if (style.Font.Underline == FontUnderlineType.DoubleAccounting)
            {
                style.Font.Underline = FontUnderlineType.Double;
            }
        }
    }

    Console.WriteLine(wb.Worksheets[0].Cells["H7"].GetStyle().Font.Underline);
    Console.WriteLine(wb.Worksheets[0].Cells["H8"].GetStyle().Font.Underline);

    wb.Save(outFile.pdf);

Hope, this helps a bit.

Can you make a code change fixing issue same as you did for double underline issue

@sreeraj_05,

I am afraid, this is not an issue so we cannot include this code change, see one of my previous post for your reference:

Aspose.Cells follows MS Excel standards and you can confirm those Single Accounting and Double Accounting underlines are also less than the text when taking the preview of the sheet in MS Excel manually.

You have to update your code accordingly if you need to have those underlines equal to the text. Please refer to the code segment in the previous post.

The issues you have found earlier (filed as CELLSNET-46187) have been fixed in Aspose.Cells for .NET v18.7. Please also check the document/article for your reference: https://docs.aspose.com/display/cellsnet/Installation

Hi Team,

I am currently using Aspose 18.6.1 trial version , we are going to buy a license and do i need to replace the dll after getting licence ?

@sreeraj_05

Please use the latest version Aspose.Cells for .NET 18.7 and apply license to avoid evaluation limitations once you get a license. You may also request a 30 days trial license to test the product in its full capacity:
https://purchase.aspose.com/temporary-license

See the document with example code for your reference:

https://docs.aspose.com/display/cellsnet/Licensing