Hi ,
I am currently using Aspose .words dll to convert word document to HTML web page . However if the word document is the landscape mode the rendered HTMl page orientation is lost and the images are aligned towards the right .
Ex: We have an Word document in the landscape mode containing images and tables , After conversion the Logo images which appear to be on the left corner of the document is right aligned and table width is said to be increased .
Is there any way to control and set the Orientation of the Rendered HTML page .
Can anyone please help me to know if this achievable ?? .
Hi,
Thanks for your interest in Aspose.Words.
Currently paper size depends on orientation as width and height are switched (please see HtmlSaveOptions.ExportPageSetup property). In the future we can also output native CSS 3 attributes. However, could you please attach your input Word document and output html file showing the undesired behaviour here for testing? I will investigate the issue on my side and provide you more information.
Secondly, you may also want to save your document in the html format using absolutely positioned elements as follows:
Document doc = new Document(@"C:\Temp\in.docx");
doc.Save(@"C:\Temp\out.html", SaveFormat.HtmlFixed);
Please let me know if I can be of any further assistance.
Best regards,
Thanks for the Reply Awais , Due to client and Organization Security policy I am unable to disclose the input word document . However I’l try the above options and let you know the result …
Hi,
Sure, in case you have further inquires or need any help, please let us know. We’re always glad to help you.
Best regards,
Awais,
After changing the code am getting logo Header to be left Aligned but the document contents are missing is there any way I can fix this .
Please find the code below .
Aspose.Words.Document doc = new Aspose.Words.Document(file.FullName);
doc.Save(@"C:\Users\253805\Desktop\TEST\Html\" + file.Name + ".html ",SaveFormat.HtmlFixed);
I have attached a sample Input word document and generated ouput HTML for your kind reference which has the same layout as tht of Orignial doc . Please let us know if this issue can be fixed .
Hi,
Thanks for your inquiry. Perhaps you’re using an older version of Aspose.Words as with Aspose.Words 13.7.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link:
https://releases.aspose.com/words/net
I hope, this helps.
Moreover, I have attached an output Html file here for your reference i.e. generated by using Aspose.Words 13.7.0. Please let me know if I can be of any further assistance.
Best regards,
Awais ,
I tried with the latest Dll of Aspose.words but still getting the Logo part which is in the Left corner to be aligned right and one of the two tables is set to be re-sized .
We are planning to have demo with our client after conversion hence would require the issue to be fixed ,Please help us on this .
Hi,
Thanks for your inquiry. In your case, the problem occurs because by default Aspose.Words exports Word text input form fields as INPUT elements in HTML. You can control how text input form fields are saved to HTML or MHTML by using HtmlSaveOptions.ExportTextInputFormFieldAsText property. Please see the following code:
Document doc = new Document(@"C:\Temp\AsposeLandsscape.docx");
HtmlSaveOptions saveOptions = new HtmlSaveOptions(SaveFormat.Html);
saveOptions.ExportTextInputFormFieldAsText = true;
doc.Save(@"C:\Temp\out.html", saveOptions);
I hope, this helps.
Best regards,
Awais,
I believe after using HtmlSaveOptions.ExportTextInputFormFieldAsText property the content and the table size is looking Good now , the only problem which I have is the Logo in the Top left corner appears to be Right Aligned , I suspect is that because of the “Evaluation Only. Created with Aspose.Words. Copyright 2003-2011 Aspose Pty Ltd” text which is on the evaluation copy ?? will it be proper in the genuine Licensed version ??.
Hi,
Thanks for your inquiry. But, the logo still appears to be aligned at the left side of the page, please find attached a screenshot. Could you please clarify where the issue is? Please create a screenshot and attach it here for my reference.
Best regards,
Awais,
I have attached a Sample Landscape word document with rendered Output for your reference .
Please Help us to Fix the issue .
Hi,
Thanks for your inquiry.
While using the latest version of Aspose.Words i.e. 13.7.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The ID of your issue is WORDSNET-8820. Your request has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.
Best regards,
The issues you have found earlier (filed as WORDSNET-8820) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.