Paragraph is pushed down to next page after DOCX>HTML>DOCX conversion using C#

Hi Support Team,

We are looking for solutions for few of things for one of our client. Which are :

  1. Doc/Docx to html (String)
  2. Html (String) to Docx
  3. Pdf to html (String)
  4. Html (String) to Pdf
  5. Html (String) to Blob

So, On our RnD we found that you are providing services related to these conversion. so we have started looking in nuget package for .net c# and first we have started with the docx file to html one. but we are facing few issues. suggest us is there any limitations in trial vs paid?

There was a problem while converting docx file to html. The issue which we are facing are

  1. Not getting first 5-7 lines in the html.
  2. Page header is not showing on html page as showing on the every page of document.

@Harsh_Yadav

Please note that in evaluation mode there are some limitations applied. E.g. Aspose.Words injects an evaluation watermark at the top of the document. The document’s content are truncated after a certain number of paragraphs during import or export.

Please get 30 days temporary license and apply it before using Aspose.Words’ classes.

If you still face problem, please attach the following resources here for testing:

  • Your input documents.
  • Please attach the output file that shows the undesired behavior.
  • Please attach the expected output file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Screenshot (8).png (103.3 KB)
Screenshot (9).png (105.2 KB)

Hi Support,
Thanks for your help.

I convert a docx file to html string and again convert html string to docx file. I am facing issue of auto shift issue. If any content reached till end of document. It automatically creating new page. As shown in Screenshots.

@Harsh_Yadav

Unfortunately, it is difficult to say what the problem is without documents and code example. We need your documents and code for testing purpose. So, please share the requested resources here for testing. We will investigate the issue and provide you more information on it.

Document.zip (45.7 KB)

Hello
For converting docx file to html string I used this c# code

Aspose.Words.Document doc = new Aspose.Words.Document(FileUrl);
HtmlSaveOptions options = new HtmlSaveOptions();
options.ExportImagesAsBase64 = true;
doc.Save(htmlFilePath + ".html", options);

From this I get the html string. After getting html string as result I user another code to convert html string to docx file.

Aspose.Words.Document doc = new Aspose.Words.Document(FileUrl);
doc.Save(htmlFilePath+".docx", SaveFormat.Docx);

Attached zip file has the actual docx file, resulted docx file and html string.

@Harsh_Yadav

We have tested the scenario using the shared documents and code example and have not found these issues at our side. Could you please share the input document for which you are facing these issues? Moreover, please share the screenshots of problematic sections of output document. We will investigate this issue further and provide you more information on it.

Thank’s tahir for your support. After using 30 days temporary license I am not facing this issue.

Currently I am facing line shifting issue while converting html string to docx file. I am attaching both the files (Original and result). In result document, it make two page document while the actual file is only of single page document.
Doc.zip (40.6 KB)

@Harsh_Yadav

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 WORDSNET-19823. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello Tahir,
Any update?

@Harsh_Yadav

We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

You reported this issue in free support forum and it will be treated with normal priority. To speed up the progress of issue’s resolution, we suggest you please check our paid support policies from following link.
Paid Support Policies

@tahir.manzoor
We are working on one of our client project. In which we have to convert document to different format. So we are planning to purchase Aspose Licence. So please help us as soon as possible other wise we have to check for another solution. Please help…

@Harsh_Yadav

Thanks for your interest in Aspose.Words. We will inform you via this forum thread once there is an update available on this issue.

The issues you have found earlier (filed as WORDSNET-19823) have been fixed in this Aspose.Words for .NET 21.7 update and this Aspose.Words for Java 21.7 update.