Word to PDF conversion problems

Hi,

We developed a Word to PDF conversion service,
I have attached a sample file.
Comparing to Office’s Word export to PDF we came across the following problems:

  1. Using document.UpdateFields() corrects the page numbers in ToC but makes the section number (not the page number) LTR where it was LTR before, so the point following the number now appears before the number.
  2. The words in a graph come out incorrect and the line break differs - see page 9 for example
  3. In page 16 the Aspose version seems to have one less line that “stayed” on page 15
  4. Tables seems to have a smaller width/larger font which causes additional rows in cells which leads to longer table - see page 18 & 56
  5. Tables seem to have messed up page margins - see pages 38-42
  6. Graph on page 12 lost its 3D

Because the service is already in production, we are pressed for time on getting the bug fixed

Hi Dvir,

Thanks for your inquiry.

*Dvir:

  1. Using document.UpdateFields() corrects the page numbers in ToC but makes the section number (not the page number) LTR where it was LTR before, so the point following the number now appears before the number.*

While using the latest version of Aspose.Words i.e. 15.7.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-12344. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience. I used the following code to reproduce it on my end:

Document doc = new Document(MyDir + @"גיבוי+דוח+ניהול+פרוייקטים+סגורים+בנדלן+סופי.docx");
doc.UpdateFields();
doc.Save(MyDir + @"15.7.0.doc");

Regarding your other issues, we are working over your query and will get back to you soon.

Best regards,

Thank you,
Have you managed to reproduce all the above mentioned issues?

Hi Dvir,

Thanks for your inquiry. Please spare us some time. We are working on these issues and will get back to you soon.

Dvir:
2. The words in a graph come out incorrect and the line break differs - see page 9 for example

Yes, we managed to reproduce the above issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-12354. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hi Dvir,

Thanks for being patient.

Dvir:
3. In page 16 the Aspose version seems to have one less line that “stayed” on page 15

After an initial test with Aspose.Words for .NET 15.7.0, I was unable to reproduce this issue on my side (please see attached 15.7.0.pdf). I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link.
https://releases.aspose.com/words/net

Dvir:
4. Tables seems to have a smaller width/larger font which causes additional rows in cells which leads to longer table - see page 18 & 56

In attached 15.7.0.pdf, do you see the same problem in this file? If yes, please create comparison screenshot which shows the problematic areas and attach it here for our reference. In your screenshot, please encircle those areas related to point 4.

Dvir:
5. Tables seem to have messed up page margins - see pages 38-42

I could observe that Tables on Page 41, 42, 43 and 44 are touching the left page margin in Aspose.Words generated PDF. I have logged this problem in our issue tracking system as WORDSNET-12355.

Dvir:
6. Graph on page 12 lost its 3D

In attached 15.7.0.pdf, you will see that there is no Graph on 12th page. Please confirm what Graph are you referring to.

Best regards,

Hi,

It seems like the pages in your conversion came out totally different
I have attached my result and office word 2 PDF conversion results for comparison.

My conversion was produced using Aspose.Word 15.7

Issue 6 is found in your PDF page 13

Issue 3 seems to be in a much greater magnitude since the page “shifting” is much more noticeable

Issue 4: I can’t tell because of the large shift

Did you change any of the default?
my code is very simple straight forward:

var doc = new Document(inputStream);
var outputStream = new MemoryStream();
doc.save(outputStream, SaveFormat.Pdf);

Hi Dvir,

Thanks for your inquiry. It seems your and mine PDF outputs differ because following fonts are missing from my machine:

  • TypographBlack
  • Typograph

Please zip and attach these font files here for testing. We will investigate the issues further on our end and provide you more information.

PS: We have just released a new version of Aspose.Words i.e. 15.8.0; can you please try it as well and see if the problems go away?

Best regards,

Hi,

I’m not using any special fonts other then my windows installation
How do I retrieve the fonts to send to you?

Hi Dvir,

Thanks for your inquiry. Please search them in Windows Fonts folder. Also, please run the following code to see if it produces any missing fonts warnings on your end?

public class HandleDocumentWarnings : IWarningCallback
{
    public void Warning(WarningInfo info)
    {
        Console.WriteLine(info.Description + ": " + info.Description);
    }
}
Document doc = new Document(MyDir + @"input.docx");
PdfSaveOptions saveOptions = new PdfSaveOptions();
HandleDocumentWarnings warningsHandler = new HandleDocumentWarnings();
doc.WarningCallback = warningsHandler;
doc.Save(@"D:\Temp\15.8.0.pdf", saveOptions);

Best regards,

Hi,

I have attached the fonts

I have yet to test the code you sent me

D’vir

Hi D’vir,

Thanks for your inquiry. You have attached following three fonts:

  • Typograph Bold
  • TypographLight
  • Typograph

Right click on any Font file, Click Properties, Go to Details tab, there you’ll find actual Font Name i.e. “Title”.

The following font file is still missing:

  • TypographBlack

Best regards,

Hi,

I have attached the missing font.
Let me know if you are missing anything else

Hi D’vir,

Thanks for sharing required resources. I will re-test all these scenarios using Aspose.Words 15.8.0 and will get back to you soon.

Best regards,

Hi Dvir,

Please find below summary of the issues you reported:

Issue 1: WORDSNET-12344
Issue 2: WORDSNET-12354
Issue 3: WORDSNET-12388
Issue 4: Could not reproduce. Please upgrade to version 15.8.0 from here.
Issue 5: WORDSNET-12355
Issue 6: WORDSNET-12389

We will inform you via this thread as soon as these issues are resolved. We apologize for any inconvenience.

Best regards,

*awais.hafeez:
Hi Dvir,

Thanks for your inquiry. Please search them in Windows Fonts folder. Also, please run the following code to see if it produces any missing fonts warnings on your end?

public class HandleDocumentWarnings : IWarningCallback
{
    public void Warning(WarningInfo info)
    {
         Console.WriteLine(info.Description + ": " + info.Description);
    }
}
Document doc = new Document(MyDir + @"input.docx");
PdfSaveOptions saveOptions = new PdfSaveOptions();
HandleDocumentWarnings warningsHandler = new HandleDocumentWarnings();
doc.WarningCallback = warningsHandler;
doc.Save(@"D:\Temp\15.8.0.pdf", saveOptions);

Best regards,

Ran the code and the warnings are as follows:

Table column widths may need to be calculated. Rendered column widths could differ.
At Table 2, Section 1: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 2, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 187.5x174.75, Paragraph 3, Cell 1, Row 1, Table 4, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 187.5x174.75, Paragraph 3, Cell 1, Row 1, Table 4, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 187.5x174.75, Paragraph 3, Cell 1, Row 1, Table 4, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 187.5x174.75, Paragraph 3, Cell 1, Row 1, Table 4, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 316.5x237.75, Paragraph 4, Cell 2, Row 1, Table 4, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 316.5x237.75, Paragraph 4, Cell 2, Row 1, Table 4, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 316.5x237.75, Paragraph 4, Cell 2, Row 1, Table 4, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 316.5x237.75, Paragraph 4, Cell 2, Row 1, Table 4, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 291.75x155.25, Paragraph 5, Cell 1, Row 2, Table 4, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 291.75x155.25, Paragraph 5, Cell 1, Row 2, Table 4, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 291.75x155.25, Paragraph 5, Cell 1, Row 2, Table 4, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 291.75x155.25, Paragraph 5, Cell 1, Row 2, Table 4, Section 1
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 5, Section 1: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 5, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 79.5x45.75, Paragraph 157, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 79.5x45.75, Paragraph 157, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 79.5x45.75, Paragraph 157, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 79.5x45.75, Paragraph 157, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 95.478188976378x45.75, Paragraph 157, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 95.478188976378x45.75, Paragraph 157, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 95.478188976378x45.75, Paragraph 157, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 95.478188976378x45.75, Paragraph 157, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 445.5x222.940157480315, Paragraph 179, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 445.5x222.940157480315, Paragraph 179, Section 1
DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 445.5x222.940157480315, Paragraph 179, Section 1: DrawingML shapes are not fully supported. Object could be rendered differently.
At DrawingML Object 445.5x222.940157480315, Paragraph 179, Section 1
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 6, Section 1: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 6, Section 1
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 7, Section 1: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 7, Section 1
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 8, Section 1: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 8, Section 1
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 9, Section 1: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 9, Section 1
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 1, Section 3: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 1, Section 3
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 2, Section 3: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 2, Section 3
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 3, Section 3: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 3, Section 3
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 4, Section 3: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 4, Section 3
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 6, Section 3: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 6, Section 3
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 9, Section 3: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 9, Section 3
Table column widths may need to be calculated. Rendered column widths could differ.
At Table 11, Section 3: Table column widths may need to be calculated. Rendered column widths could differ.
At Table 11, Section 3
Shape shadow effects are not supported in full: Shape shadow effects are not supported in full
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.: Best Fit position of data labels is not fully supported, labels might be rendered on incorrect positions.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.
Compound lines are not supported. Using solid line instead.: Compound lines are not supported. Using solid line instead.

Hi Dvir,

Thanks for the additional information. It means that all required fonts your document uses are installed on your machine because Aspose.Words does not throw Fonts related warnings. Rest assured, we will inform you via this thread as soon as these issues are resolved. We apologize for any inconvenience.

Best regards,

Hi,

Any idea when the fixes will be available?
I’m taking heat from the end user

Hi Dvir,

Thanks for being patient. Please check below the progress of these issues:

WORDSNET-12344: Pending for analysis and is in the queue
WORDSNET-12354: It is resolved. Fix will be included in next 15.10.0 version
WORDSNET-12388: Pending for analysis and is in the queue
WORDSNET-12355: Analysis Complete and root cause has been identified
WORDSNET-12389: Implementation of this issue has been postponed
WORDSNET-12469: Implementation of this issue has been postponed

We will inform you via this thread as soon as these issues are resolved. We apologize for any inconvenience.

Best regards,

WORDSNET-12469 is table width?

Hi Dvir,

Thanks for your inquiry. Please see attached simplified Word document. You will see text wrapping is different in axis labels as compared to MS Word 2013 generated Pdf. The issue is tricky one. Aspose.Words currently selects Font of labels improperly. Also, width of tick is a little bigger than in original, that leads into incorrect wrapping. This issue will be addressed by WORDSNET-12469.

Best regards,