We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Paragraphs move to previous page after conversion from DOC to PDF using Java

Hello!
We use aspose-words 16.1.0.
In our Java application we convert DOC-file to PDF.
After the conversion, in the resulting PDF-file, the height of the empty rows changed to a smaller, and part of the text of page 2 is on page 1.
This occurs in the operating system Red Hat Enterprise Linux Server release 5.5 (Tikanga).
When converting the operating system MS Windows no such problem occurs.
Search for similar problems and solutions did not give result

If necessary, ready to provide a sample application.

In the attachment:
example_doc.doc - source DOC-file
example_doc_result_rh.pdf - the result of the conversion on the platform Red Hat Enterprise Linux Server release 5.5 (Tikanga)
example_doc_result_win.pdf - the result of the conversion on the platform MS Windows

Hi Alexey,


Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts on the machine where you’re converting documents to Pdf. Please refer to the following article:

How Aspose.Words Uses True Type Fonts

Moreover, please use 30-days temporary license to avoid the limitations in evaluation mode of Aspose.Words and use latest version of Aspose.Words for Java 16.6.0.

If you still face problem, please embed the fonts inside your input document and share it here for testing. We will investigate the issue on our side and provide you more information. To embed a TrueType font in a saved document in Microsoft Office Word 2013, follow these steps:

  • First, select the File option from the Word ribbon at the top of the screen.
  • From the options bar on the left-hand side, choose Options.
  • A Word Options window will come up. Select the Save option from the banner on the left-hand side.
  • Under Preserve fidelity when sharing this document select the check box next to Embed fonts in the file. Then click OK.
Hello!
Thanks for the answer.
I'm install TrueType fonts files on the system.
result of call fc-cache
/usr/share/fonts/truetype/msttcorefonts: caching, new cache contents: 60 fonts, 0 dirs
Unfortunately the problem persists.

As you said, attaching a file with embeded fonts.
Hi Alexey,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSJAVA-1409. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.
Hi, Tahir
Thanks, I will wait.
Maybe there's some way, at the moment, to get around this problem?
Hi Alexey,

Thanks for your inquiry. Unfortunately, there is no workaround available for this issue. We will inform you once there is any update available on this issue. Thanks for your patience.

Hi, Tahir


The error can be corrected or have already have a workaround for the solution?
Hi Alexey,

Thanks for your inquiry. The "Use printer metrics to lay out document" option is enabled in your document. In Windows we use native GDI calls to retrieve font metrics. Unfortunately, this feature is missing for Unix-based systems. We will inform you via this forum thread as soon as there are any further developments on this issue.

We apologize for your inconvenience.

@croacker

It is to inform you that we have closed the issue WORDSJAVA-1409 with Won’t Fix resolution.

In Windows we use native GDI calls to retrieve font metrics when the “Use printer metrics to lay out document” option is enabled. Unfortunately, the solution is not available for Unix-based platforms.