Weird view of HTML files on servers

Hi ,

We have purchased aspose.total 3 weeks . When I tested the Aspose.words API for word to HTML conversion on my local machine then we got a satisfactory output but now when I implemented it on servers then we are getting weird view of the converted HTML on the servers. Could you explain the possible reason of this behavior. I have attached snapshot of the both views.

Thanks.

Ajay

Hi Ajay,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple application (for example a Console
    Application Project
    ) that demonstrates the code (Aspose.Words code) you used to generate
    your output document

  • Please attach the output HTML file that shows the undesired behavior.
  • What environment are you running on?
  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • .NET Framework version (or Java version )


Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

Hi,

Sorry for posting the problem inappropriately.

Here are the details:

OS used: Linux

version:Java

Architecture: 64 bit

input word document:attached

stand alone Java code:attached

snapshots of the both views:attached

wierdview HTML and correct HTML : attached

Using apache tomcat server and jboss

Description: HTML generated through stand alone application are working fine but the HTML generated on server looks weird. We are using HTML_FIXED as save option and we can't use only HTML option as its output is not approved by our team.


Thanks,

Ajay


Hi Ajay,

Thanks for sharing the detail.

I have tested the scenario and have managed to reproduce the bullets issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10269. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

Regarding font issue, the text of your document has font ‘Times New Roman’. However, the output ‘correctview’ and ‘weirdview’ show the incorrect font name. Please check fontFaces.css of output documents. Could you please confirm this? We will then investigate this issue at Linux using Tomcat/Jobss.

Hi,

Thanks for your reply. This exactly the problem . The style.css created by Aspose.words uses different fonts for same file on different systems.

Like the correct view was created by stand alone Java App and the another one (weird view) was created on my local server(using tomcat/jboss).

Please help us ASAP as this has become a crucial issue for our next release.


Thanks,

Ajay


Hi Ajay,

Thanks for sharing the detail. I have tested again the same font’s issue at Ubuntu, Tomcat using following code snippet and have not found the shared issue. The fontFaces.css shows the ‘Times New Roman’ font. I have attached the output HTML with this post for your kind reference.


Document doc = new Document(MyDir + "Original doc.docx");

doc.save(MyDir + "Out.html", SaveFormat.HTML_FIXED);


Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats. Make sure you have all the Fonts installed on the machine you're using to convert Word document to HtmlFixed. Please try the following code snippet at your end and let us know if you still face problem.

Document doc = new Document(MyDir + "in.docx");

FontSettings.SetFontsFolder(@"C:\MyFonts\", false);

doc.Save(MyDir + "out.html", SaveFormat.HtmlFixed);




Hi ,

Any update on converting bullet points in docx to "?" symbol in to HTML ?

Please fix this bug ASAP.

Thanks,

Ajay

Hi Ajay,

Thanks for your inquiry. I would like
to share with you that issues are addressed and resolved based on first
come first serve basis. Currently, your issue is pending for analysis
and is in the queue. We will update you via this forum thread once there
is any update available on your issue.

Thank you for your patience and understanding.

Hi Ajay,

Regarding WORDSNET-10269, this issue was reproduced at Windows operating system. The bullets do not render correctly when output HtmlFixed open in FireFox. However, there is no issue when the same HTML file is opened in Chrome browser. Please check the attached image for detail.

ajaysingh:

OS used: Linux
version:Java
Architecture: 64 bit
input word document:attached
stand alone Java code:attached
snapshots of the both views:attached
wierdview HTML and correct HTML : attached
Using apache tomcat server and jboss

We have noticed that this issue does not appear at Linux operating system. I have attached the output documents with this post for your kind reference. Please check the Linux.zip. I tested this issue at Ubuntu, Tomcat and JDK 1.6.

In case you are using an older version of Aspose.Words, I would suggest you please upgrade to the latest version (v14.5.0) from here and let us know how it goes on your side.

Hi Ajay,

Thanks for your patience. I have received response from our development team about WORDSNET-10269. Most probably this is not a bug in Aspose.Words. Please check the initial analysis of this issue below:

The output HTML (weird view) is produced on a Linux machine and then modified by your’s software (additional HTML elements are inserted that are required by the customer’s web site). In this case, the bullets are rendered as question marks both on Linux and Windows machines.

It is most probably your software that replaces bullets with question marks. The replacement occurs because the document is processed using a non-Unicode encoding.

tahir.manzoor:
Hi Ajay,

Thanks for sharing the detail. I have tested again the same font's issue at Ubuntu, Tomcat using following code snippet and have not found the shared issue. The fontFaces.css shows the 'Times New Roman' font. I have attached the output HTML with this post for your kind reference.


Document doc = new Document(MyDir + "Original doc.docx");

doc.save(MyDir + "Out.html", SaveFormat.HTML_FIXED);


Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats. Make sure you have all the Fonts installed on the machine you're using to convert Word document to HtmlFixed. Please try the following code snippet at your end and let us know if you still face problem.

Document doc = new Document(MyDir + "in.docx");

FontSettings.SetFontsFolder(@"C:\MyFonts\", false);

doc.Save(MyDir + "out.html", SaveFormat.HtmlFixed);






Hi,

We have seen that if true type font used in a doc file are not available, then also word file is converted into html using some different fonts. We just want to know , which fonts will be used in that case on a centos system?
Also, how to find out which fonts will be supported if no true type fonts are installed on a system?

currently we are using aspose-words-14.7.0-jdk16.jar on a centos server.

Please respond ASAP as we have to answer these queries to one of our client.

Thanks,
Ajay

Hi Ajay,

Thanks
for your inquiry. I would suggest you please read the
following articles:
http://www.aspose.com/docs/display/wordsjava/How+Aspose.Words+Uses+True+Type+Fonts
http://www.aspose.com/docs/display/wordsjava/How+to++Specify+True+Type+Fonts+Location

Please read the section ‘Font Availability and Substitution’ from above documentation links and let us know if you have any more queries.

The issues you have found earlier (filed as WORDSNET-10269) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.