Issue with css porperty "white-space: nowrap"

Hello!
The files for reproducing the problem are attached to this message. Please, pay attention to the class “.money”. He has the property “white-space: nowrap”. This property is ignored for getting PDF/Word files. This is a mistake that needs to be corrected.
Thank you!
attach.zip (48.0 KB)

@interfax,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you convert your document to PDF using MS Word, you will get the same output. We have attached the output PDF file with this post for your kind reference. The output is generated by latest version of Aspose.Words for .NET 17.10.
17.10.pdf (40.2 KB)

Correct display of these elements critical for us. What are the ways of solving this problem?

@interfax,

Thanks for your inquiry. In your case, we suggest you please set the table’s cell width according to your requirement. Please refer to the following article.
Specifying Table and Cell Widths

Please check the following code example. Hope this helps you.

    var document = new Document(MyDir + "report.html");
    foreach (Table table in document.GetChildNodes(NodeType.Table, true))
    {
        foreach (Row row in table.Rows)
            foreach (Cell cell in row.Cells)
            {
                if (cell.IsFirstCell)
                    cell.CellFormat.Width = 150;
                else
                    cell.CellFormat.Width = 70;
            }
        table.AutoFit(AutoFitBehavior.FixedColumnWidths);
    }

    document.Save(MyDir + "17.10.docx");
    document.Save(MyDir + "17.10.pdf");

Hello,
Such a decision is not suitable for us. There are a lot of similar tables in our system, with heterogeneous data.
We need the correct processing of “nowrap”.
Thank you in advance.

@interfax,

Thanks for your inquiry. In your CSS, we have not found the class “align-right js-money money”. We suggest you please use one of the following style in table’s cell. This works fine for output Word document but not for PDF.

<td style=“white-space: nowrap;”>1 288 031 031</td>
<td class=“money”>1 288 031 031</td>

Could you please share complete detail of your use case? We will then log this issue for PDF document in our issue tracking system. Thanks for your cooperation.

File with styles contains this class.
https://yadi.sk/i/LZgpbJQ43P4Y4K
https://yadi.sk/i/1BOdZEBL3P4Y6L
It’s critical for us that this solution must work as in *.doc as in *.pdf.

@interfax,

Thanks for your inquiry. We have logged this problem in our issue tracking system as WORDSNET-16052. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Good afternoon.
What is the status of this task? When the problem will be solved?

@interfax,

Thanks for your inquiry. We regret to share with you that the issue (WORDSNET-16052) has been postponed due to missing feature WORDSNET-832 (Make table layout as close to Word as possible) which is related to it.

After the fix of WORDSNET-832, our product team will look into this issue. We will be sure to inform you via this forum thread as soon as this feature is available. We apologize for your inconvenience.

Hello!

This is very sensitive issue for us. Is there any chance to make custom build for us or speed up this process? Our customers are frustrated and can’t use financial reports with this issues (Please see attach included).

aspose2.png (130.3 KB)

@interfax,

Thanks for your inquiry. We have asked for the ETA of this issue from our product team. As soon as any information is shared by them, we will be more than happy to share that with you.

Thanks for your patience and understanding.

Hello!
Can you please tell me the results of the work on this task? Three months have already passed, our customers require this error correction.
Thank you!

@ErikaP

Thanks for your inquiry. Unfortunately, there is no ETA available for your issue. Our product team is actively working on WORDSNET-832 feature. However, the underlying problem here is very complex and involves many internal tests as well. We will inform you via this forum thread as soon as there are any further developments.

We apologize for your inconvenience.

A post was split to a new topic: HTML to DOCX/PDF conversion issue with css property “white-space: nowrap”

The issues you have found earlier (filed as WORDSNET-16052) have been fixed in this Aspose.Words for .NET 23.10 update also available on NuGet.