java.util.prefs.WindowsPreferences warning

Hello,

when converting a .doc to a .pdf, the conversion succeeds but the following warning appears on standard error. I would like to suppress it. Is there anything I can do to that aim?

Apr 09, 2014 11:47:25 AM java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.

Regards
MO

Hi Michel,

Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (PDF, XPS or SWF). Make sure you have all the Fonts installed on your machine you’re using to convert Word document to PDF format. I would suggest you please read the following articles:

http://www.aspose.com/docs/display/wordsjava/How+to++Specify+True+Type+Fonts+Location
http://www.aspose.com/docs/display/wordsjava/How+Aspose.Words+Uses+True+Type+Fonts

In case you are using an older version of Aspose.Words, I would suggest you please upgrade to the latest version (v14.3.0) from here and let us know how it goes on your side. If the problem still remains, please share following detail for investigation purposes.

  • Please attach your input Word document.
  • Please create a standalone/runnable simple Java application that demonstrates the code (Aspose.Words code) you used to generate the shared warning messages.
  • Please attach the output Pdf file
  • What environment are you running on?
  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • 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,



I tried v14.3.0 as you suggest and on the empty attached Doc1.docx created by MS Words. The problem is still present. It happens when saving the .docx as a .pdf via Aspose.Words, so there is something weird with that part of Aspose.Words.



This is the only library I’m using in almost 20 years of Java programming that seems to make use of Java preferences, directly or indirectly.

Hi Michel,

Thanks for your inquiry. I have converted the shared Docx to Pdf and have not found any warning issue. I have tested this scenario at Windows 7 (64 bit), JDK 1.6. Please check the attached image for detail. The warning message which you are getting seems not to be related with Aspose.Words. Could you please elaborate your query along with following detail?


  • Please create a standalone/runnable simple Java application that demonstrates the code (Aspose.Words code) you used to generate the shared warning messages.
  • Please attach the output Pdf file
  • What environment are you running on?
  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • Java version

As soon as you get these pieces of information to us we’ll start our investigation into your issue.

Hi,



I ran my code on a Linux machine and the warning was not reported, so it seems that it depends on Windows.



Thus, I searched on the network and found the suggestion of manually creating a key in the Windows registry. The problem disappeared. However, I’m still wondering what happens, since I encountered this problem only by using Aspose.Words.



Here you find the suggestion about the registry key mentioned above:

windows - Groovy Shell warning "Could not open/create prefs root node ..." - Stack Overflow



Regards

Hi Michel,

Thanks for your feedback. It is nice to hear from you that your problem has been solved.


This issue seems not to be related with Aspose.Words. Perhaps, there is some other issue at your end which causes this issue. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.