I'm having a problem during the following DOCX> HTML> DOCX conversion flow, what happens is that the original document is in portrait mode and the resulting DOCX is coming in landscape mode and i lost A4 size, messing up my entire document.
as shown below:
ORIGINAL:
AFTER CONVERTED HTML TO DOCX AGAIN:
This is my code (i use Spire.Doc 8.7.5 version):
- Code: Select all
Document document = new Document();
document.LoadFromFile(newPath + i + "-Contrato" + ext);
document.AcceptChanges();
document.SaveToFile(newPath + @"\convertido.html", FileFormat.Html);
Document DestinationDoc = new Document();
DestinationDoc.LoadFromFile(newPath + @"\convertido.html", FileFormat.Html, XHTMLValidationType.None);
DestinationDoc.SaveToFile(newPath + @"\resultante.docx", FileFormat.Docx);