Alignment & placement issue

Alignment & placement issue

Attaching the original document & converted PDF

DBNB086.docx (855.7 KB)

Preview File Post Formatting.pdf (979.7 KB)

@Harinathkorpathi Unfortunately, I cannot reproduce the problem on my side. I have used hte following simple code for testing:

Document doc = new Document("C:\\Temp\\in.docx");
doc.save("C:\\Temp\\out.pdf");

As I can see page size is different in your output PDF document. Do you change it programmatically before conversion?

What is the standard approach to handle the Page size , retain the same as doc

@Harinathkorpathi Aspose.Words retains original page size of the document after conversion. As I have mentioned, I cannot reproduce the problem on my side using the following code:

Document doc = new Document("C:\\Temp\\in.docx");
doc.save("C:\\Temp\\out.pdf");

Below are the errors we are getting , need your expert suggestion

2023-09-11T14:11:52,196  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 1, Section 1
2023-09-11T14:11:52,196  - Warning TYPE = = 65536 Description = Cell spacing is not supported. The table will be rendered without cell spacing.
              At Table 2, Section 1
2023-09-11T14:11:52,196  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 2, Section 1
2023-09-11T14:11:52,196  - Warning TYPE = = 65536 Description = Cell spacing is not supported. The table will be rendered without cell spacing.
              At Table 3, Section 1
2023-09-11T14:11:52,196  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 3, Section 1
2023-09-11T14:11:52,196  - Warning TYPE = = 65536 Description = Cell spacing is not supported. The table will be rendered without cell spacing.
              At Table 4, Section 1
2023-09-11T14:11:52,196  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 4, Section 1
2023-09-11T14:11:52,228  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 1, Section 2
2023-09-11T14:11:52,290  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 2, Section 2
2023-09-11T14:11:52,290  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 3, Section 2
2023-09-11T14:11:52,321  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 4, Section 2
2023-09-11T14:11:52,337  - Warning TYPE = = 131072 Description = Font 'Open Sans' has not been found. Using 'Segoe UI' font instead. Reason: alternative name from document.
2023-09-11T14:11:52,337  - Warning = FONT substitutionFont 'Open Sans' has not been found. Using 'Segoe UI' font instead. Reason: alternative name from document.
2023-09-11T14:11:52,368  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 5, Section 2
2023-09-11T14:11:52,368  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 6, Section 2
2023-09-11T14:11:52,368  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 7, Section 2
2023-09-11T14:11:52,400  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 8, Section 2
2023-09-11T14:11:52,446  - Warning TYPE = = 65536 Description = Cell spacing is not supported. The table will be rendered without cell spacing.
              At Table 1, Section 3
2023-09-11T14:11:52,446  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 1, Section 3
2023-09-11T14:11:52,446  - Warning TYPE = = 65536 Description = Cell spacing is not supported. The table will be rendered without cell spacing.
              At Table 2, Section 3
2023-09-11T14:11:52,446  - Warning TYPE = = 65536 Description = Table column widths may need to be calculated. Rendered column widths could differ.
              At Table 2, Section 3

@Harinathkorpathi These are not errors, they are warnings produced by Aspose.Words layout engine. I think the most notable among them are the following:

2023-09-11T14:11:52,337  - Warning TYPE = = 131072 Description = Font 'Open Sans' has not been found. Using 'Segoe UI' font instead. Reason: alternative name from document.
2023-09-11T14:11:52,337  - Warning = FONT substitutionFont 'Open Sans' has not been found. Using 'Segoe UI' font instead. Reason: alternative name from document.

This means font used in your document is not available on the machine where conversion is performed. This might cause layout differences in the resulting document.

Refer the attached document & PDF after converting alignment of the page 4 & 5 in the PDF got changed, Please check & suggest on the same

DTBUP001.docx (234.8 KB)
DTBUP001.pdf (355.6 KB)

@Harinathkorpathi Unfortunately, the problem is not reproducible on my side. As I can see you are using 23.7 version. Please try using the latest 23.8 version of Aspose.Words for Java. Here is output PDF produced on my side using the following simple code:

Document doc = new Document("C:\\Temp\\in.docx");
doc.save("C:\\Temp\\out.pdf");

out.pdf (344.7 KB)