We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose PDF with applet

Hello,

We are using Aspose library with applet, when applet loads at the start of web application its taking around 10-15 minutes to load the Aspose jar file which is very long to wait for user. IS there any way to load the library faster or any other approach to use Aspose library with applet.

Thanks,
Kishor Koli

Hi Kishor,


Thanks for your inquriy. We will appreciate it if you please share your environment details here, so we will guide you exactly.

However if you are facing issue with Tomcat then please note it is a known fact that the signed jars placed in “lib” directory makes the tomcat startup process very slow. As a workaround you can skip Aspose Jars scanning, you have to modify file catalina.properties to change the option “tomcat.util.scan.StandardJarScanFilter.jars” for the purpose. Please try following settings and share the results, it will resolve the issue.

File: ${CATALINA_HOME}/conf/catalina.properties


# Default list of JAR files that should not be scanned using the JarScanner
# functionality. This is typically used to scan JARs for configuration
# information. JARs that do not contain such information may be excluded from
# the scan to speed up the scanning process. This is the default list. JARs on
# this list are excluded from all scans. The list must be a comma separated list
# of JAR file names.
# The list of JARs to skip may be over-ridden at a Context level for individual
# scan types by configuring a JarScanner with a nested JarScanFilter.
# The JARs listed below include:
# - Tomcat Bootstrap JARs
# - Tomcat API JARs
# - Catalina JARs
# - Jasper JARs
# - Tomcat JARs
# - Common non-Tomcat JARs
# - Test JARs (JUnit, Cobertura and dependencies)
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=<br>bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,<br>annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,<br>jaspic-api.jar,<br>jetty-.jar,oro-.jar,servlet-api-.jar,tagsoup-.jar,xmlParserAPIs-.jar,<br>xom-.jar


Change it as:

# Default list of JAR files that should not be scanned using the JarScanner
# functionality. This is typically used to scan JARs for configuration
# information. JARs that do not contain such information may be excluded from
# the scan to speed up the scanning process. This is the default list. JARs on
# this list are excluded from all scans. The list must be a comma separated list
# of JAR file names.
# The list of JARs to skip may be over-ridden at a Context level for individual
# scan types by configuring a JarScanner with a nested JarScanFilter.
# The JARs listed below include:
# - Tomcat Bootstrap JARs
# - Tomcat API JARs
# - Catalina JARs
# - Jasper JARs
# - Tomcat JARs
# - Common non-Tomcat JARs
# - Test JARs (JUnit, Cobertura and dependencies)
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=<br>bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,<br>annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,<br>jaspic-api.jar,<br>jetty-.jar,oro-.jar,servlet-api-.jar,tagsoup-.jar,xmlParserAPIs-.jar,<br>xom-.jar,aspose*.jar

Best Regards,

Hi Tilal,

Thanks for the response, I have tried the change in properties file as suggested by you but that didn’t help me too to load the applet faster on clients machine. Server details for the application server are,
OS : Windows Server 2008 R2 Enterprise (Service Pack 1) 64 bit OS.

Thanks,
Kishor Koli


Hi Tilal,

Appreciate response. I am working with Kishor on this issue.
The issue is more to do with applet not being smoothly downloaded (10-15 min first time) on client;coz jar size and also, applets inherently being slow . We have no luck even after compressing jars using pack200.
So the options we were contemplating,
1) Can we have a lightweight ASPOS just to use printers as part of applet .
2) Can we use Aspose but enhance the download performance somehow.
Sorry for being verbose. Hope, I explained the use case we are stuck with.

Amol.

Hi Kishor/Amol,


Thanks for your feedback. We will appreciate it if you please share a sample project along with your web server and Aspose.Pdf for Java version. We will try to replicate the issue at our end and will guide you accordingly.

We are sorry for the inconvenience.

Best Regards,

Hello Tilal,

Thanks for the help, you can test the same with any web application launching applet from the applications start page and the jnlp file of the corresponding application will have aspose.pdf as resource parameter in it. Aspose version used is 17.2.0 with tomcat 7. Let us know if we can help more with it.

Thanks,
Kishor Koli

Hi Kishor,


Thanks for your feedback. I am configuring the environment and will update you with my findings soon.

Meanwhile, we will appreciate if you please test the scenario with latest version of Tomcat 8.x.x and share the results. As we have recently noticed some performance issue in a customer issue.

Best Regards,

Hi Tilal,
As per your suggestion, I have tested the same on Tomcat 8 and the time required is still around 15 minutes or so. Can you provide a jar file that will be used only for printing ? I have seen some libraries where they have different jar files for different purposes like printing, integrating and so.
As the library file of aspose is collectively of 40 mb, it takes more time to get downloaded on clients machine through applet.

Thanks,
Kishor

Hi Kishor,


Thanks for your inquriy. Please note as per our policy we do not provide JAR for a specific feature. It is common in Java applications that when there is not enough memory, the code execution will become very slow. The solution is to add more memory to the Java heap space size, just more than required by the process. We will suggest to increase heap space size in jnlp to 2GB or more and share the results.

<j2se version=“1.8+” max-heap-size=2048m" />

Furthermore, I am trying to replicate your issue at my end but currently I am getting ClassNotFoundException. I am looking into it and will update you accordingly.

We are sorry for the inconvenience.

Best Regards,

Hello Tilal,
Thanks for the help, I have tried increasing the size but it didn’t helped too to minimize the time required to load jar file. Any update on the same ?

Thanks,
Kishor Koli

Hi Kishor,


Thanks for your feedback. I have tested a sample applet with JNLP file using Aspose.Pdf for Java 17.2.0 and tomcat 8.5.11 but unable to replicate the issue. It is taking less than 1 minute to load. I will appreciate it if you please share your sample project, it will help us to replicate and address your issue exactly at our end.

We are sorry for the inconvenience.

Best Regards,

Hi Tilal,

The problem occurs with tomcat 8.0.X, when you start the project the ram goes at 1.8 GB and the process stops with error.

Regards Riccardo

Hi Riccardo,


Thanks for sharing details. I am looking into it and will share my findings with you.

We are sorry for this inconvenience.

Best Regards

Hi Kishor,


Thanks for sharing the details.

We received related complaints from some other customers and during our investigation, we observed that the problem occurs only in the earlier versions of Tomcat and even when using latest versions 8.0.24 or 8.0.20, we did not replicate the problem.


The tomcat functionality has been improved in recent versions. For more information, please visit http://tomcat.apache.org/oldnews-2014.html


Can you please try using the latest versions as Tilal mentioned earlier, we did not notice any problem when using recent release version.