DocToPDFConverter problem with converting formated numbers

when converting a docx file to pdf,:
{
DocToPDFConverter converter = new DocToPDFConverter()
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
}

if the docx contains some numbers in RTL font, then, the numbers are REVERSED in the converted PDF. (unwanted behavior)

see, attached source DOCX and output PDF.

what can I do to solve this problem?
do you have quickfix, patch?

is there a workaround?

Attachment: doc2pdf_9a9b5a35.zip

6 Replies 1 reply marked as answer

HC Hemalatha Chiranjeevulu Syncfusion Team February 8, 2021 11:49 AM UTC

Hi Guy,

Thank you for contacting Syncfusion support.

We can reproduce the reported number preservation issue when converting Word document to PDF in our end, and we suspect it to be a defect. We will validate this issue and update you with more details on 10th February 2021.

Please let us know if you have any other questions.

Regards,
Hemalatha C 



GS guy sade February 10, 2021 10:01 AM UTC

I found a workaround (until a fix/patch is ready from you).  I have no idea why it is working:
PLZ, send a fix asap.

public static void FixRTLnumbers(WordDocument document)
        {
                var pattern = new System.Text.RegularExpressions.Regex(@"\d+,\d+\.\d+|\d+,\d+");  //0,000.0000 | 0,000
                TextSelection[] textSelections = document.FindAll(pattern);
                if (textSelections != null && textSelections.Length > 0)
                {                    
                    for (int i = 0; i < textSelections.Length; i++)
                    {
                        //Sets the highlight color for the searched text as it was:
                        var currentHighColor = textSelections[i].GetAsOneRange().CharacterFormat.HighlightColor;
                        textSelections[i].GetAsOneRange().CharacterFormat.HighlightColor = currentHighColor;
                    }
                }

                 DocToPDFConverter converter = new DocToPDFConverter()
               PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
         }
            


HC Hemalatha Chiranjeevulu Syncfusion Team February 10, 2021 07:48 PM UTC

Hi Guy,

Sorry for the inconvenience.

We are facing some complexities while validating the reported issue. Currently, we are validating on this issue and will update you with more details on 12th February 2021.

Please let us know if you have any other questions.

Regards,
Hemalatha C 



HC Hemalatha Chiranjeevulu Syncfusion Team February 15, 2021 02:38 AM UTC

Hi Guy,

Thank you for your patience.

We have confirmed that the reported RTL number get reversed when converting Word document to PDF is a defect. Since you are using our Weekly NuGet release (v18.4.0.42), we have planned to include this fix in our weekly NuGet release on 2nd March 2021.

To track the status of the reported issue, please use the following feedback link.
https://www.syncfusion.com/feedback/22427/rtl-number-get-reversed-while-converting-word-document-to-pdf

Note: If you require a patch for this issue in any other version, please kindly let us know the currently installed version, so that we can provide a patch in that version based on our SLA policy.

Please let us know if you have any other questions.

Regards,
Hemalatha C 



MJ Mohanaselvam Jothi Syncfusion Team March 2, 2021 12:00 PM UTC

Hi Guy,

Sorry for the inconvenience. 
We have faced some testing failures in our automation testing for this fix and not able to include in our current Weekly NuGet. Currently we are working on this as high priority. We have planned to include this fix in our weekly NuGet release on 9th March, 2021.

To track the status of the reported bug, please use the following feedback link. https://www.syncfusion.com/feedback/22427/rtl-number-get-reversed-while-converting-word-document-to-pdf  

Please let us know if you have any other questions.

Regards,
Mohanaselvam J  



MJ Mohanaselvam Jothi Syncfusion Team March 9, 2021 07:32 AM UTC

Hi Guy,

Thank you for your patience.

We have included the fix for mentioned RTL number get reversed when converting Word document to PDF in our latest Weekly NuGet (v18.4.0.47). We are glad to announce that our latest Weekly NuGet is now available. You can use that latest NuGet to get resolve this issue at your end.

The status of this task can be tracked through below link
https://www.syncfusion.com/feedback/22427/rtl-number-get-reversed-while-converting-word-document-to-pdf 

Note: This fix will be included in our 2021 Volume 1 release, which is expected to be available at mid of March, 2021 tentatively.

Please let us know if you have any other questions.

Regards,
Mohanaselvam J 


Marked as answer
Loader.
Up arrow icon