After upgrading to latest version of Aspose.Pdf for Java, namely 4.6.0, we are getting the following exception:
<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>14</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>IT</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><span style=“font-size:12.0pt;font-family:“Times New Roman”,“serif”;
mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:
IT;mso-fareast-language:IT;mso-bidi-language:AR-SA”>java.security.AccessControlException:
access denied (“java.io.FilePermission” “C:\WINDOWS\Fonts”
“read”)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
at java.security.AccessController.checkPermission(AccessController.java:560)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.exists(File.java:770)
at com.aspose.pdf.b.c.g.c.p.a(Unknown Source)
at com.aspose.pdf.b.c.g.c.p.populateMaps(Unknown Source)
at com.aspose.pdf.b.c.g.c.p.dcS(Unknown Source)
at com.aspose.pdf.b.c.g.c.p.dcR(Unknown Source)
at com.aspose.pdf.b.c.g.c.b.a.g(Unknown Source)
at com.aspose.pdf.b.c.g.c.ac.ddZ(Unknown Source)
at com.aspose.pdf.b.c.g.c.ac.isAccessible(Unknown Source)
at com.aspose.pdf.Font.a(Unknown Source)
at com.aspose.pdf.Font.(Unknown Source)
at com.aspose.pdf.FontCollection.cOH(Unknown Source)
at com.aspose.pdf.FontCollection.(Unknown Source)
at com.aspose.pdf.Resources.getFonts(Unknown Source)
at com.aspose.pdf.b.c.g.d.l.a(Unknown Source)
at com.aspose.pdf.b.c.g.d.l.parse(Unknown Source)
at com.aspose.pdf.b.c.g.d.n.a(Unknown Source)
at com.aspose.pdf.b.c.g.d.n.a(Unknown Source)
at com.aspose.pdf.b.c.g.d.n.deV(Unknown Source)
at com.aspose.pdf.b.c.g.d.n.(Unknown Source)
at com.aspose.pdf.TextFragmentAbsorber.visit(Unknown Source)
at com.agews.suite626.util.Util.placeSignatureFields(Util.java:300)
at com.agews.suite626.servlet.old.Servlet.save(Servlet.java:112)
at com.agews.suite626.servlet.old.Servlet.output(Servlet.java:614)
at com.agews.suite626.servlet.old.SingleReport.process(SingleReport.java:59)
at com.agews.suite626.servlet.old.Servlet.doPost(Servlet.java:157)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:277)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:536)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:309)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:169)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:299)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Here you notice that the library is for some<!–[if gte mso 10]>
<![endif]–> reason looking for fonts in C:\Windows\Fonts, but since this is a CentOs machine, that folder clearly does not exists and also causes an exception for an access violation in the Java security manager; also the fonts folder had already been set calling FontSettings.setFontsFolder() in a previous moment.
This did NOT happen using version 4.2.1, and we would like this bug to be fixed, since if it is not we cannot update the library.