Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Jul 30, 2020 7:32 pm

I am testing spire.docs as follows, convert docx to html and then take the html and convert it back to docx, at the end of this process a large spacing is placed between my paragraphs, as shown in the example below:

Original image:
Image

After converting from html to docx:
Image

My code:
Code: Select all
      public void test()
        {
            Document document = new Document();
            document.LoadFromFile(@"C:\Users\Guilh\Desktop\Testes\Contrato Phytus - com marcas de revisão\original.docx");
            document.SaveToFile(@"C:\Users\Guilh\Desktop\Testes\Contrato Phytus - com marcas de revisão\convertido.html", FileFormat.Html);

            Document DestinationDoc = new Document();
            DestinationDoc.LoadFromFile(@"C:\Users\Guilh\Desktop\Testes\Contrato Phytus - com marcas de revisão\convertido.html", FileFormat.Html, XHTMLValidationType.None);
            DestinationDoc.SaveToFile(@"C:\Users\Guilh\Desktop\Testes\Contrato Phytus - com marcas de revisão\restaurado.docx", FileFormat.Docx);
        }



Why this happens?

prado_lol
 
Posts: 10
Joined: Thu Jul 30, 2020 7:12 pm

Fri Jul 31, 2020 3:10 am

Hi,

Thanks for your post.
I used the latest Spire.Doc (Spire.Doc Pack(hot fix) Version:8.7.5) to test your case, but didn't reproduce the "Large line spacing between paragraphs" issue after conversion, if you were not using the latest version, please first give it a try, if the issue still occurs after trying, please provide your original Word document for further test. You could attach it here or send it to us via eamil (support@e-iceblue.com).

Sincerely,
Lynn
E-iceblue support team
User avatar

lynn.zhang
 
Posts: 57
Joined: Mon Jul 27, 2020 2:27 am

Mon Aug 03, 2020 8:03 pm

Thanks for you reply!

The new version its work!

prado_lol
 
Posts: 10
Joined: Thu Jul 30, 2020 7:12 pm

Tue Aug 04, 2020 7:41 am

Thanks for your feedback.
Glad to hear that your issue has been resolved. If you need further assistance, please feel free to write back.
Wish you all the best!

Sincerely,
Lynn
E-iceblue support team
User avatar

lynn.zhang
 
Posts: 57
Joined: Mon Jul 27, 2020 2:27 am

Return to Spire.Doc