documents4j is a Java library for converting documents into another document format

Related tags

Utility documents4j
Overview

documents4j

documents4j is a Java library for converting documents into another document format. This is achieved by delegating the conversion to any native application which understands the conversion of the given file into the desired target format. documents4j comes with adaptations for MS Word and MS Excel for Windows what allows for example for the conversion of a docx file into a pdf file without the usual distortions in the resulting document which are often observed for conversions that were conducted using non-Microsoft products.

documents4j offers a simple API and two implementations of this API:

  • Local: The local API implementation delegates a document conversion to an application on the same machine which is capable of applying the requested conversion. For this to work, the executing machine requires an installation of the backing conversion software such as for example MS Word or MS Excel. documents4j offers a simple mechanism for registering custom converters but ships with implementations of such converters for MS Word and MS Excel for Windows.
  • Remote: The remote API implementation delegates a document conversion to a server which is queried by a simple REST-API. For this to happen, it sends the file to the server and includes information about the requested document conversion formats. It then receives the converted document as a response to its request.

To users of the documents4j API, it is fully transparent which implementation is used. This way, a local conversion implementation can for example be applied in a test environment while applying the remote implementation in production. Also, this allows for easy mocking of the converter back-end.

The API

documents4j uses a fluent API for performing a document conversion. As mentioned, the API does not expose any details of the backing converter implementation. Instead, a converter is represented by an instance of IConverter. Using this converter, an example conversion of a MS Word file into a PDF is executed as follows:

File wordFile = new File( ... ), target = new File( ... );
IConverter converter = ... ;
Future<Boolean> conversion = converter
                                .convert(wordFile).as(DocumentType.MS_WORD)
                                .to(target).as(DocumentType.PDF)
                                .prioritizeWith(1000) // optional
                                .schedule();

All methods of the IConverter interface and its builder types offer overloaded methods. Instead of providing File instances, it is also possible to provide an InputStream as a source document and an OutputStream for writing the result. These streams are never closed by documents4j. As another option, the source document can be obtained by querying an IInputStreamSource or an IFileSource which offer generic callback methods which are then used by documents4j. Similarly, the IInputStreamConsumer and IFileConsumer interfaces allow for implementing a generic way of processing the result of a conversion. However, note that these callbacks are normally triggered from another thread. These threads are used by documents4j internally such that you should not perform heavy tasks from these callbacks. documents4j is fully thread-safe as long as it is not stated differently.

Finally, a conversion can be prioritized via prioritizeWith where a higher priority signals to the converter that a conversion should be conducted before a conversion with lower priority if both conversions are getting queued. documents4j is capable of performing document conversions concurrently and puts conversion into an internal job queue which is organized by these priorities. There is however not guarantee that a conversion with higher priority is performed before a conversion with lower priority.

A conversion can be scheduled to be executed in the background by calling schedule after specifying a conversion. Alternatively, by calling execute, the current thread will block until the conversion is finished. The resulting boolean indicates if a conversion was successful. Exceptional conversion results are however communicated by exceptions which are described below.

For finding out which conversions are supported by an IConverter, you can query the getSupportedConversions method which returns a map of source formats to their supported target formats. Furthermore, you can call the isOperational in order to check the functionality of a converter. A converter might not be operational because its prerequisites are not met. Those prerequisites are described below for each implementation of an IConverter.

Note that an IConverter implementation might describe a rather expensive structure as it is normally backed by external resources such as native processes or a network connection. For repeated conversions, you should reuse the same instance of an IConverter. Furthermore, note that an IConverter has an explicit life-cycle and must be shut down by invoking shutDown. documents4j registers a shut-down hook for shutting down converter instances, but you should never rely on this mechanism. Once an IConverter was shut down, it cannot be restarted. After a converter was shut down, its isOperational always returns false.

Local converter

The LocalConverter implementation of IConverter performs conversions by converting files within the same (non-virtual) machine. A LocalConverter is created by using a simple builder:

IConverter converter = LocalConverter.builder()
                           .baseFolder(new File("C:\Users\documents4j\temp"))
                           .workerPool(20, 25, 2, TimeUnit.SECONDS)
                           .processTimeout(5, TimeUnit.SECONDS)
                           .build();

The above converter was configured to write temporary files into the given folder. If this property is set, documents4j creates a random folder. By setting a worker pool, you determine the maximum number of concurrent conversions that are attempted by documents4j. A meaningful value is ultimately determined by the capabilities of the backing converters. It is however also determined by the executing machine's CPU and memory. An optimal value is best found by trial-and-error.

Furthermore, a timeout for external processes of 5 seconds is set. In order to convert a file into another document format, the conversion is delegated to an implementation of IExternalConverter. Such external converters normally start a process on the OS for invoking a conversion by some installed software. documents4j ships with two such external converters, once implementation for MS Word on Windows and one for MS Excel on Windows. If these converters are found on the class path, the LocalConverter discovers and loads them automatically unless they are explicitly deregistered by the builder's disable method. Custom converters need to be registered explicitly by the builder's enable method.

Note that the builder itself is mutable and not thread-safe. The resulting LocalConverter on the other side is fully thread-safe.

Microsoft Word converter

The MS Word converter is represented by a MicrosoftWordBridge instance. This bridge starts MS Word when the connected LocalConverter is started an quits Word once the local converter is shut down. Note that this implies that only a single active LocalConverter instance must exist not only for a JVM but for the entire physical machine. Otherwise, MS Word might be shut down by one bridge while it is still required by another instance. This cannot be controlled by documents4j but must be assured by its user. Also, make sure not to use MS Word outside of a Java application while a MicrosoftWordBridge is active, for example by opening it from your desktop.

Furthermore, the LocalConverter can only be run if:

  • The JVM is run on a MS Windows platform that ships with the Microsoft Scripting Host for VBS (this is true for all contemporary versions of MS Windows.
  • MS Word is installed in version 2007 or higher. PDF conversion is only supported when the PDF plugin is installed. The plugin is included into MS Word from Word 2010 and higher.
  • MS Word is not already running when the LocalConverter starts. This is in particularly true for MS Word instances that are run by another instance of LocalConverter. (As mentioned, be aware that this is also true for instances running on a different JVM or that are loaded by a different class loader.)
  • MS Word is properly activated and configured for the user running the JVM. MS Word does therefore not require any configuration on program startup or any other wizard.
  • When the JVM application which uses the LocalConverter is run as a service, note the information on using MS Word from the MS Windows service profile below.

Note that MS Windows's process model requires GUI processes (such as MS Word) to be started as a child of a specific MS Windows process. Thus, the MS Word process is never a child process of the JVM process. Thus, the MS Word process will survive in case that the JVM process is killed without triggering its shut-down hooks. Make sure to always end your JVM process normally when using documents4j. Otherwise, orphan processes might live without the JVM process. documents4j will however attempt to reuse these processes after a restart.

Microsoft Excel converter

The MS Excel converter is represented by a MicrosoftExcelBridge instance. All information that was given on the MicrosoftWordBridge apply to the MS Excel bridge. However, note that MS Excel is not equally robust as MS Word when it comes to concurrent access. For this reason, the MicrosoftExcelBridge only allows for the concurrent conversion of a single file. This property is enforced by documents4j by using an internal lock.

Important: Note that you have to manually add a dependency to either the MicrosoftWordBridge or the MicrosoftExcelBridge when using the LocalConverter. The MS Word bridge is contained by the com.documents4j/documents4j-transformer-msoffice-word Maven module and the MS Excel bridge by the com.documents4j/documents4j-transformer-msoffice-excel module.

Microsoft PowerPoint converter

The MS PowerPoint converter is represented by a MicrosoftPowerPointBridge instance. Unlike the bridges for Word and Excel, the PowerPoint bridge needs explicit activation. This is due to PowerPoint's requirement to run in the foreground which opens PowerPoint on the executing machine which can cause problems in some environments.

Give it a try

documents4j was written after evaluating several solutions for converting docx files into pdf which unfortunately all produced files with layout distortions of different degrees. For these experiences, documents4j comes with an evaluation application which is run in the browser. For starting this application, simply run the following commands on a Windows machine with MS Word and MS Excel installed:

git clone https://github.com/documents4j/documents4j.git
cd documents4j
cd documents4j-local-demo
mvn jetty:run

You can now open http://localhost:8080 on you machine's browser and convert files from the browser window. Do not kill the application process but shut it down gracefully such that documents4j can shut down its MS Word and MS Excel processes. In order for this application to function, MS Word and MS Excel must not be started on application startup.

Custom converters

Any converter engine is represented by an implementation of IExternalConverter. Any implementation is required to define a public constructor which accepts arguments of type File, long and TimeUnit as its parameters. The first argument represents an existing folder for writing temporary files, the second and third parameters describe the user-defined time out for conversions. Additionally, any class must be annotated with @ViableConversion where the annotation's from parameter describes accepted input formats and the to parameter accepted output formats. All these formats must be encoded as parameterless MIME types. If a converter allows for distinct conversions of specific formats to another then the @ViableConversions annotation allows to define several @ViableConversion annotations.

Remote converter

A RemoteConverter is created fairly similar to a LocalConverter by using another builder:

IConverter converter = RemoteConverter.builder()
                           .baseFolder(new File("C:\Users\documents4j\temp"))
                           .workerPool(20, 25, 2, TimeUnit.SECONDS)
                           .requestTimeout(10, TimeUnit.SECONDS)
                           .baseUri("http://localhost:9998")
                           .build();

Similarly to the LocalConverter, the RemoteConverter requires a folder for writing temporary files which is created implicitly if no such folder is specified. This time however, the worker pool implicitly determines the number of concurrent REST requests for converting a file where the request timeout specifies the maximal time such a conversion is allowed to take. As the base URI, the remote converter specifies the address of a conversion server which offers a REST API for performing document conversions. Note that all the IConverter's getSupportedConversions and isOperational methods delegate to this REST API as well and are not cached.

Conversion server

documents4j offers a standalone conversion server which implements the required REST API by using a LocalConverter under the covers. This conversion server is contained in the com.documents4j/documents4j-server-standalone module. The Maven build creates a shaded artifact for this module which contains all dependencies. This way, the conversion server can be started from the command line, simply by:

java -jar documents4j-server-standalone-<VERSION>-shaded.jar http://localhost:9998

The above command starts the conversion server to listen for a HTTP connection on port 9998 which is now accessible to the RemoteConverter. The standalone server comes with a rich set of option which are passed via command line. For a comprehensive description, you can print a summary of these options by supplying the -? option on the command line.

A conversion server can also be started programmatically using a ConversionServerBuilder.

Conversion client

Similarly to the conversion server, documents4j ships with a small console client which is mainly intended for debugging purposes. Using the client it is possible to connect to a conversion server in order to validate that a connection is possible and not prevented by for example active fire walls. The client is contained in the com.documents4j/documents4j-client-standalone module. You can connect to a server by:

java -jar documents4j-client-standalone-<VERSION>-shaded.jar http://localhost:9998

Again, the -? option can be supplied for obtaining a list of options.

Encryption

It is possible to use a SSL connection between the client and server by specifying a SSLContext in the server.

TThe standalone implementations of server and client converters are capable of using SSLContext.getDefault() for establishing a connection by setting the -ssl parameter on startup. The default trust store and key store configuration) can be adjusted by setting javax.net.ssl.* system properties when running a standalone application from the console. The allowed encryption algorithms can be adjusted by setting the https.protocols property.

To run the standalone server with SSL support:

  1. Import your certificate into a keystore. keytool does not support importing certificates directly, therefore, you have to bundle them first using openssl:
    openssl pkcs12 -export -in /path/to/your/cert.crt -inkey /path/to/your/cert.key -name serverCert -out /tmp/keystore-PKCS-12.p12 -password pass:yourPassword
    keytool -importkeystore -noprompt -deststorepass yourPassword -srcstorepass yourPassword -destkeystore /path/to/your/keystore -srckeystore /tmp/keystore-PKCS-12.p12
    
  2. Afterwards, run the server with the given key store:
    java -jar documents4j-client-standalone-
         
          -shaded.jar https://0.0.0.0:8443 -ssl -Djavax.net.ssl.keyStore=/path/to/your/keystore -Djavax.net.ssl.keyStorePassword=yourPassword
    
         

A password such as yourPassword can be any chosen freely but is required.

Authentication

The standalone server can be started with basic authentication support with -auth user:pass.

Aggregating converter

Additionally to the LocalConverter and the RemoteConverter, documents4j extends the IConverter API by IAggregatingConverter which allows to delegate conversions to a collection of underlying converters. This interface is implemented by the AggregationConverter class.

Using this extension serves three main purposes:

  1. It allows for the aggregation of several IConverters to achieve a load balancing for multiple conversions. By default, an AggregatingConverter applies a round robin strategy. A custom strategy can be implemented as an ISelectionStrategy.
  2. Using the methods of the IAggregatingConverter interface, it is possible to register or remove aggregated IConverters after the creation of the AggregatingConverter. This way, it is for example possible to migrate to another conversion server without restarting an application or to restart an inoperative local converter.
  3. It allows to expose multiple converters that support different conversion formats by a single instance of IConverter.

An AggregatingConverter is created using a similar builder as when creating a LocalConverter or RemoteConverter which allows to specify the converter's behavior:

IConverter first = ... , second = ... ;

IConverterFailureCallback converterFailureCallback = ... ;
ISelectionStrategy selectionStrategy = ... ;

IAggregatingConverter converter = AggregatingConverter.builder()
                                      .aggregates(first, second)
                                      .selectionStrategy(selectionStrategy)
                                      .callback(converterFailureCallback)
                                      .build();

An AggregatingConverter cannot generally guarantee the success of an individual conversion if an aggregated IConverter becomes inoperative during a conversion process. The aggregating converter does however eventually discover a converter' inaccessibility and removes it from circulation. For being notified of such events, it is possible to register a delegate as an IConverterFailureCallback. It is also possible to request regular health checks when creating a converter. Doing so, inoperative converters are checked for their state and removed on failure in fixed time intervals.

Exception hierarchy

The exception hierarchy was intentionally kept simple in order to hide the details of an IConverter implementation from the end user. All exceptions thrown by the converters are unchecked. This is of course not true for futures which fulfill the Future interface contract and wrap any exception in an java.util.concurrent.ExecutionException whenever Future#get() or Future#get(long, TimeUnit) are invoked.

The native exceptions thrown by an IConverter are either instances of ConverterException or one of its subclasses. Instances of ConverterException are only thrown when no specific cause for an error could be identified. More specific exceptions are:

  • ConversionFormatException: The converter was requested to translate a file into a DocumentType that is does not support.
  • ConversionInputException: The source file that was provided for a conversion could not be read in the given source file format. This means that the input data either represents another file format or the input data is corrupt and cannot be read by the responsible converter.
  • FileSystemInteractionException: The source file does not exist or is locked by the JVM or another application. (Note: You must not lock files in the JVM when using a LocalConverter since they might need to be processed by another software which is then prevented to do so.) This exception is also thrown when the target file is locked. Unlocked, existing files are simply overwritten when a conversion is triggered. Finally, the exception is also thrown when using a file stream causes an IOException where the IO exception is wrapped before it is rethrown.
  • ConverterAccessException: This exception is thrown when a IConverter instance is in invalid state. This occurs when an IConverter was either shut down or the conditions for using a converter are not met, either because a remote converter cannot longer connect to its conversion server or because a backing conversion software is inaccessible. This exception can also occur when creating a LocalConverter or a RemoteConverter.

Note: Be aware that IConverter implementations do not follow a prevalence of exceptions. When a user is trying to convert a non-existent file with a converter in an inoperative state, it cannot be guaranteed that this will always throw a FileSystemInteractionException instead of a ConverterAccessException. The prevalence will differ for different implementations of the IConverter API.

Logging

All logging is delegated to the SLF4J facade and can therefore be processed independently of this application. The verbosity of this application's logging behavior is determined by the overall logging level where info or warn are recommended as minimum logging levels in production. The different logging levels will determine the following events to be logged:

  • trace: On this level, all concurrent code will log the acquisition and release of monitors.
  • info: On this level, non-exceptional state interactions with external resources will be logged. A logging message will for example expose when MS Word is started or stopped or when a conversion server is bound to a port.
  • debug: This logging level is not used by this application.
  • warn: On this level, non-fatal errors are logged such as the timeout of a HTTP conversion due to high traffic. Normally, such log events are accompanied by an exception being thrown.
  • error: On this level, all user errors are logged. For example, the attempt of converting a non-existent file would cause a logging event on this level. Normally, such events are accompanied by an exception being thrown.

Monitoring

documents4j registers two monitoring endpoints:

  • Health endpoint under /health returning 200 OK if the converter server is operational and 500 Internal Server Error otherwise.
  • Running endpoint under /running returning always 200 OK.

Both endpoints are always unprotected, even if the documents4j runs with basic authentication.

Troubleshooting

  • Don't open and close MS Office on the same machine as the server is running. After closing it again, the server won't be operational any more. The client will fail with

    com.documents4j.throwables.ConverterAccessException: The converter could not process the request
    

    and false will appear at the top of the status xml page returned by GET /. Of course, there may be more reasons causing MS Office to stop working. A restart of the server will fix this.

  • If the server is run by command line in an Windows Command Line window be sure not to leave the window in "Select mode" by clicking on it or marking text. This will cause the server not to respond any more and the clients will run into timeouts.

Performance considerations

Input and target description

The API intents to hide the implementation details of a specific IConverter implementation from the end user. However, a RemoteConverter needs to send data as a stream which requires reading it to memory first. (As of today, documents4j does not make use of Java NIO.) This is why a RemoteConverter will always perform better when handed instances of InputStream and OutputStream as source and target compared to files. The LocalConverter on the other hand, communicates with a backing conversion software such as MS Word by using the file system. Therefore, instances of File as source and target input will perform better when using a LocalConverter.

In the end, a user should however always try to hand the available data to the IConverter implementation. The implementation will then figure out by itself what data it requires and convert the data to the desired format. In doing so, the converter will also clean up after itself (e.g. closing streams, deleting temporary files). There is no performance advantage when input formats are converted manually.

Configuring an executing JVM

MS Office components are (of course) not run within the Java virtual machine's process. Therefore, an allocation of a significant amount of the operating system's memory to the JVM can cause an opposite effect to performance than intended. Since the JVM already reserved most of the operating system's memory, the MS Word processes that were started by the JVM will run short for memory. At the same time, the JVM that created these processes remains idle waiting for a result. It is difficult to tell what amount of memory should optimally be reserved for the JVM since this is highly dependant of the number of concurrent conversion. However, if one observes conversion to be critically unperformant, the allocation of a significant amount of memory to the JVM should be considered as a cause.

Configuring MS Office

When running a MS Office-based converter, it it important to appropriately configure MS Office before running documents4j. For example, it is crucial to disable all kinds of start-up wizards which can abort the conversion process if the MS Office API returns unexpected status codes. Furthermore, it can improve performance significantly when bookkeeping features such as the recent documents listing are disabled.

Running as Windows service

documents4j might malfunction when run as a Windows service together with MS Office conversion. Note that MS Office does not officially support execution in a service context. When run as a service, MS Office is always started with MS Window's local service account which does not configure a desktop. However, MS Office expects a desktop to exist in order to run properly. Without such a desktop configuration, MS Office will start up correctly but fail to read any input file. In order to allow MS Office to run in a service context, there are two possible approaches of which the first approach is more recommended:

  1. On a 32-bit system, create the folder C:\Windows\System32\config\systemprofile\Desktop. On a 64-bit system, create the folder C:\Windows\SysWOW64\config\systemprofile\Desktop. Further information can be found on MSDN.
  2. You can manipulate MS Window's registry such that MS Office applications are run with another account than the local service account. This approach is documented on MSDN. Note that this breaks MS Window's sandbox model and imposes additional security threats to the machine that runs MS Office.

When running the standalone server, you should also start it in service mode by the -M flag to avoid using system input.

Windows service - troubleshooting

  1. If you are experiencing requests jammed by a MS Office window reporting stating that some previous conversion failed, you can use MS bat script for looking those windows and close them over Windows' task scheduler. First create a .bat file with these commands and add it as a new task to run every minute:
    taskkill /F /FI "WindowTitle eq Microsoft Word*"
    taskkill /F /FI "WindowTitle eq Microsoft Office*"
    
  2. For those that are experiencing multiples instances of msword and wsscript on task manager, all of them as zombies, you can use MS bat script to kill them by script over Windows' task scheduler. First create a .bat file with these commands, then, add it to new task to run every day at 6AM (for instance). Attention: current conversions will fail when this script been triggered, therefore, choose an idle time for the script application:
    taskkill /f /t /im wscript.exe
    taskkill /f /t /im winword.exe
    

Building the project

This project is set up to allow running as many tests as possible without requiring MS Office or even MS Windows installed. For this purpose, the project includes several rich stubs that step in place of the MS Office bridges. When you are building this project on a machine with MS Windows and MS Office installed, you should build the project with the ms-office profile which triggers tests that rely on an actual MS Office instance. You can then build the project using Maven:

mvn package -Pms-office

When you are testing native converters such as the MicrosoftWordBridge or the MicrosoftExcelBridge, do not forget to keep an eye on your task manager. Consider an alternative to the default task manager such as Process Explorer for debugging purposes. For monitoring network connections, I recommend TCPView.

Several time consuming operations such as building source code and javadoc artifacts as well as building the shaded jar for the standalone server are only executed when the corresponding Maven profiles shaded-jar, source or javadoc are active.

Build Status Maven Central Download

Licensing

This software is licensed under the Apache Licence, Version 2.0. When using this converter in correspondence with MS Office products, please note Microsoft's commentary on the use of MS Office in a server context which is not officially supported. Also note the legal requirements for using MS Office in a server context. Microsoft states:

Current licensing guidelines prevent Office applications from being used on a server to service client requests, unless those clients themselves have licensed copies of Office. Using server-side Automation to provide Office functionality to unlicensed workstations is not covered by the End User License Agreement (EULA).

Note that documents4j has several dependencies which are note licensed under the Apache License. This includes dependencies using a CDDL license and the GPL license with a class path exception. All this normally allows the use of documents4j without redistributing the source code. However, note that using documents4j comes without any (legal) warranties, both when used together with or without MS Office components.

Credits

This application was developed by Kantega AS as a project order of the municipality of Oslo and was open-sourced thanks to their generous endorsement.

This library would not possible without the use of zt-exec library from ZeroTurnaround is a great help for handling command line processes in a Java application. Also, I want to thank the makers of thread-weaver for their great framework for unit testing concurrent applications. Finally, without the help of mockito, it would have been impossible to write proper unit tests that run without the integration of MS Word.

Comments
  • Conversion failed for an unknown reason

    Conversion failed for an unknown reason

    Code : File wordFile = new File("Results/test.xlsx") , target = new File("Results/ReportMSWord.pdf"); IConverter test = LocalConverter.make(); test.convert(wordFile).as(DocumentType.MS_EXCEL) .to(target).as(DocumentType.PDF) .prioritizeWith(1000) // optional .execute(); test.shutDown();

    Error :

    avr. 22, 2016 2:48:18 PM com.documents4j.conversion.msoffice.MicrosoftExcelBridge startUp INFO: From-Microsoft-Excel-Converter was started successfully avr. 22, 2016 2:48:18 PM com.documents4j.conversion.msoffice.MicrosoftWordBridge startUp INFO: From-Microsoft-Word-Converter was started successfully avr. 22, 2016 2:48:18 PM com.documents4j.job.LocalConverter <init> INFO: The documents4j local converter has started successfully avr. 22, 2016 2:48:18 PM com.documents4j.conversion.msoffice.AbstractMicrosoftOfficeBridge doStartConversion INFO: Requested conversion from Results\test.xlsx (application/vnd.com.documents4j.any-msexcel) to Results\ReportMSWord.pdf (application/pdf) Exception in thread "main" com.documents4j.throwables.ConverterException: Conversion failed for an unknown reason at com.documents4j.job.AbstractFutureWrappingPriorityFuture.run(AbstractFutureWrappingPriorityFuture.java:90) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    bug 
    opened by Soliax 39
  • Can't deploy demo 1.0.3-SNAPSHOT

    Can't deploy demo 1.0.3-SNAPSHOT

    $ mvn jetty:run [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building documents4j-local-demo 1.0.3-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> jetty-maven-plugin:7.6.3.v20120416:run (default-cli) @ documents4j-lo cal-demo >>> [WARNING] The POM for com.documents4j:documents4j-local:jar:1.0.3-SNAPSHOT is mi ssing, no dependency information available [WARNING] The POM for com.documents4j:documents4j-transformer-msoffice-word:jar: 1.0.3-SNAPSHOT is missing, no dependency information available [WARNING] The POM for com.documents4j:documents4j-transformer-msoffice-excel:jar :1.0.3-SNAPSHOT is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.257s [INFO] Finished at: Mon Feb 29 14:14:44 CET 2016 [INFO] Final Memory: 7M/245M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project documents4j-local-demo: Could not reso lve dependencies for project com.documents4j:documents4j-local-demo:war:1.0.3-SN APSHOT: The following artifacts could not be resolved: com.documents4j:documents 4j-local:jar:1.0.3-SNAPSHOT, com.documents4j:documents4j-transformer-msoffice-wo rd:jar:1.0.3-SNAPSHOT, com.documents4j:documents4j-transformer-msoffice-excel:ja r:1.0.3-SNAPSHOT: Could not find artifact com.documents4j:documents4j-local:jar: 1.0.3-SNAPSHOT -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso lutionException

    However after downgrading to the 1.0.2 it works perfectly.

    question 
    opened by SeriousSem 13
  • The conversion finished unsuccessful

    The conversion finished unsuccessful

    Hello I wrote my own app that provide rest service to convert docx to pdf. In back I use lib documents4j.

    When I started tomcat from startup.bat script everything is OK. But. When I started tomcat as service i recieve error during conversion:

    2017-10-11 09:29:26,098 TRACE [http-nio-8080-exec-1] c.d.c.m.MicrosoftWordBridge [AbstractExternalConverter.java:64] Execute no-argument script c:\mnt\jobs\temp_files\WordConvertToPDFSufix\word_start360973979.vbs
    2017-10-11 09:29:26,504 INFO [http-nio-8080-exec-1] c.d.c.m.MicrosoftWordBridge [MicrosoftWordBridge.java:45] From-Microsoft-Word-Converter was started successfully
    2017-10-11 09:29:26,504 INFO [http-nio-8080-exec-1] c.d.j.LocalConverter [LocalConverter.java:54] The documents4j local converter has started successfully
    2017-10-11 09:29:26,504 INFO [http-nio-8080-exec-1] p.g.s.c.c.WordConvertToPDFImpl [WordConvertToPDFImpl.java:85] createConverter() end return=com.documents4j.job.LocalConverter@5c0aab12 437ms
    2017-10-11 09:29:26,504 INFO [http-nio-8080-exec-1] p.g.s.c.s.ConverterServiceImpl [ConverterServiceImpl.java:66] convertDocxToPdf(fileIn=File[ name: file size: 62563 originalFilename: 88-121_AEGZ_Wn_oswiadczenie_UNI3_OBB_2017111_73824615_1484751.docx contentType: application/vnd.openxmlformats-officedocument.wordprocessingml.document]) File [c:/mnt/jobs/temp_files/WordConvertToPDFSufix/61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx] size: 62 563
    2017-10-11 09:29:26,504 INFO [http-nio-8080-exec-1] p.g.s.c.c.WordConvertToPDFImpl [WordConvertToPDFImpl.java:94] convertMsWordToPdf(converter=com.documents4j.job.LocalConverter@5c0aab12, srcPath=c:/mnt/jobs/temp_files/WordConvertToPDFSufix/61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx, dstPath=c:/mnt/jobs/temp_files/WordConvertToPDFSufix/17a62ca9-1536-4a6c-9bf9-acd2cf188928.pdf) begin
    2017-10-11 09:29:26,520 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:53] Attempt to execute conversion
    2017-10-11 09:29:26,520 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:60] Source fetched: c:\mnt\jobs\temp_files\WordConvertToPDFSufix\61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx
    2017-10-11 09:29:26,520 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:66] Run method locked wrapped future for source c:\mnt\jobs\temp_files\WordConvertToPDFSufix\61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx
    2017-10-11 09:29:26,520 INFO [pool-3-thread-1] c.d.c.m.MicrosoftWordBridge [AbstractMicrosoftOfficeBridge.java:63] Requested conversion from c:\mnt\jobs\temp_files\WordConvertToPDFSufix\61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx (application/vnd.com.documents4j.any-msword) to c:\mnt\jobs\temp_files\WordConvertToPDFSufix\17a62ca9-1536-4a6c-9bf9-acd2cf188928.pdf (application/pdf)
    2017-10-11 09:29:26,535 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:71] Context fetched for source c:\mnt\jobs\temp_files\WordConvertToPDFSufix\61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx: com.documents4j.job.LocalConversionContext@2c683b57
    2017-10-11 09:29:26,535 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:73] Underlying future created for source c:\mnt\jobs\temp_files\WordConvertToPDFSufix\61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx: com.documents4j.conversion.ProcessFutureWrapper@400f50c3
    2017-10-11 09:29:26,535 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:77] Blocking during external conversion for source c:\mnt\jobs\temp_files\WordConvertToPDFSufix\61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx: com.documents4j.conversion.ProcessFutureWrapper@400f50c3
    2017-10-11 09:29:26,785 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:108] Conversion caused an error
    com.documents4j.throwables.ConversionInputException: The input file seems to be corrupt
    	at com.documents4j.util.Reaction$ConversionInputExceptionBuilder.make(Reaction.java:159)
    	at com.documents4j.util.Reaction$ExceptionalReaction.apply(Reaction.java:75)
    	at com.documents4j.conversion.ExternalConverterScriptResult.resolve(ExternalConverterScriptResult.java:70)
    	at com.documents4j.conversion.ProcessFutureWrapper.evaluateExitValue(ProcessFutureWrapper.java:48)
    	... 6 common frames omitted
    Wrapped by: java.util.concurrent.ExecutionException: The conversion finished unsuccessful
    	at com.documents4j.conversion.ProcessFutureWrapper.evaluateExitValue(ProcessFutureWrapper.java:50)
    	at com.documents4j.conversion.ProcessFutureWrapper.get(ProcessFutureWrapper.java:36)
    	at com.documents4j.conversion.ProcessFutureWrapper.get(ProcessFutureWrapper.java:11)
    	at com.documents4j.job.AbstractFutureWrappingPriorityFuture.run(AbstractFutureWrappingPriorityFuture.java:78)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    2017-10-11 09:29:26,785 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:128] Release locks for FailedConversionFuture{exception=com.documents4j.throwables.ConversionInputException, message=The input file seems to be corrupt}
    2017-10-11 09:29:26,785 TRACE [pool-3-thread-1] c.d.j.LocalFutureWrappingPriorityFuture [AbstractFutureWrappingPriorityFuture.java:130] Locks for FailedConversionFuture{exception=com.documents4j.throwables.ConversionInputException, message=The input file seems to be corrupt} are released
    2017-10-11 09:29:26,801 ERROR [http-nio-8080-exec-1] p.g.s.c.c.WordConvertToPDFImpl [WordConvertToPDFImpl.java:105] convertMsWordToPdf(converter=com.documents4j.job.LocalConverter@5c0aab12, srcPath=c:/mnt/jobs/temp_files/WordConvertToPDFSufix/61c8a7c2-87c9-4b7c-9641-07dfbe6a87d8.docx, dstPath=c:/mnt/jobs/temp_files/WordConvertToPDFSufix/17a62ca9-1536-4a6c-9bf9-acd2cf188928.pdf) Could not complete conversion
    com.documents4j.throwables.ConversionInputException: The input file seems to be corrupt
    	at com.documents4j.util.Reaction$ConversionInputExceptionBuilder.make(Reaction.java:159)
    	at com.documents4j.util.Reaction$ExceptionalReaction.apply(Reaction.java:75)
    	at com.documents4j.conversion.ExternalConverterScriptResult.resolve(ExternalConverterScriptResult.java:70)
    	at com.documents4j.conversion.ProcessFutureWrapper.evaluateExitValue(ProcessFutureWrapper.java:48)
    	at com.documents4j.conversion.ProcessFutureWrapper.get(ProcessFutureWrapper.java:36)
    	at com.documents4j.conversion.ProcessFutureWrapper.get(ProcessFutureWrapper.java:11)
    	at com.documents4j.job.AbstractFutureWrappingPriorityFuture.run(AbstractFutureWrappingPriorityFuture.java:78)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	... 1 common frames omitted
    Wrapped by: java.util.concurrent.ExecutionException: Could not complete conversion
    	at com.documents4j.job.FailedConversionFuture.get(FailedConversionFuture.java:35)
    	at com.documents4j.job.FailedConversionFuture.get(FailedConversionFuture.java:10)
    	at com.documents4j.job.AbstractFutureWrappingPriorityFuture.get(AbstractFutureWrappingPriorityFuture.java:205)
    	at com.documents4j.job.AbstractFutureWrappingPriorityFuture.get(AbstractFutureWrappingPriorityFuture.java:10)
    	at pl.gb.server.converter.component.WordConvertToPDFImpl.convertMsWordToPdf(WordConvertToPDFImpl.java:103)
    	at pl.gb.server.converter.service.ConverterServiceImpl.convertDocxToPdf(ConverterServiceImpl.java:68)
    	at pl.gb.server.converter.controllers.ConverterController.convertDocxToPdf(ConverterController.java:64)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
    	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
    	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
    	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
    	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
    	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at pl.gb.server.converter.base.CorsFilter.doFilter(CorsFilter.java:20)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
    	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    	at java.lang.Thread.run(Thread.java:748)
    

    Maybe it will help if error message will be more detailed. Furthermore there is no error number with what vbs script ends.

    Can you help? Best regards Marek

    question 
    opened by marekzzz 9
  • Exporting excel to PDF in landscape format.

    Exporting excel to PDF in landscape format.

    Hi,

    I am not really sure about the vb scripting but seems like excel spreadsheet with the landscape formatting are not being generated in the same way when converted into pdf. Not sure if this has something to do with the vb scripting https://msdn.microsoft.com/en-us/library/bb238907(v=office.12).aspx

    I might be wrong, could you please guide me how to export the file in a landscape format. Thanks

    enhancement wontfix 
    opened by mrtinkz 9
  • Exception on startup when using office and excel transformers

    Exception on startup when using office and excel transformers

    Hi there,

    I got a strange error after restarting my spring application that contains a conversion using LocalConverter inside a singleton component.

    After restart Tomcat server, I see a exception in catalina.out about error trying to invoke construtor, same error described in this issue.

    "com.documents4j.conversion.msoffice.MicrosoftWordBridge could not be created by a (File, long, TimeUnit)"

    As I figured out that could be some Windows Server or MS Office update, I updated my pom with latest version of documents4j (1.1.10) and also for spring boot, but no success, I continue to get the same exception during Tomcat startup.

    Looking close to my pom, I realized that I'm using documents4j-transformer-msoffice-word and documents4j-transformer-msoffice-excel, but I not converting Excel files in this application. After remove excel transformer and deploy, everything works normally again.

    I don't know to explain what happened in here, however, what I suppose is about some instantiation through reflection that possibly running against class cast exception or incorrect constructors between word and office transformers.

    About my environment:

    Windows Server 64bits Office 2019 Documents4j version: 1.1.10 Spring: 2.7.6 Java: 1.8.x

    opened by carlosspohr 7
  • MacOS scripts for Excel and Word

    MacOS scripts for Excel and Word

    Here my changes for Issue #126, Support for MacOS.

    I've added .applescripts for Word and Excel. These work on the command line. I've also added the code for execution in documents4j, plus retrieval of the return value as you proposed.

    I still have problems running the test-cases (on windows and mac), however in my own application the conversion works as intended.

    opened by jposterloh 6
  • Is there a timeout for the documents-4j-server-standalone due to inactivity?

    Is there a timeout for the documents-4j-server-standalone due to inactivity?

    Hello,

    Is there a timeout for the documents-4j-server-standalone due to inactivity? I've used the server normally for a few times, but after a few hours without use it, the server goes down (operational "false"), and I don't know why. The server throws FileSystemInteractionException, but it doens't make any sense for me, the system did the same request, with same file, more than once few hours ago. After then, I restart server and it works.

    I've read the documentation but I haven't found any information about this. Can you help me?

    How I get the remote converter (I only create one instance in the context with a Factory): RemoteConverter.builder().workerPool(20, 25, 20, TimeUnit.SECONDS).requestTimeout(20, TimeUnit.SECONDS).baseUri(baseUri).build();

    How I convert:

    private void convertByDocuments4j(File fileToConvert, File newFile) throws IOException {
    	try (InputStream fileInputStream = new BufferedInputStream(new FileInputStream(fileToConvert.getPath()))) {
    		try (OutputStream fileOutStream = new FileOutputStream(newFile)) {
    			IConverter converter = getConverter();
    			convert(fileInputStream, fileOutStream, converter);
    		}
    	}
    }
    	
    private void convert(InputStream fileInputStream, OutputStream fileOutStream, IConverter converter) {
    	try {
    		LOGGER.info("Documents4j: conversion initializing");
    		boolean conversion = converter.convert(fileInputStream).as(DocumentType.MS_WORD).to(fileOutStream)
    				.as(DocumentType.PDF).execute();
    		LOGGER.info("Documents4j: conversion result = " + conversion);
    	} catch (Exception e) {
    		LOGGER.error("Documents4j: conversion error", e);
    	}
    }
    
    question 
    opened by tadeubonatti 6
  • Not able to redirect the log to a file with documents4j-server-standalone-1.0.2-shaded

    Not able to redirect the log to a file with documents4j-server-standalone-1.0.2-shaded

    Hi. We are currently using documents4j-server-standalone-0.2.1-shaded to convert our office douments to pdf.

    I would like to upgrade to version 1.0.2.

    However, it looks like there is a bug in the commandline parsing in version 1.0.2 which makes it impossible to redirect the logging to a file.

    The problem can be reproduced by running 1.0.2 from a windows command promt like this :

    C:\PDFKonv\old>"C:\Program Files\Java\jre1.8.0_91\bin\java.exe" -jar documents4j-server-standalone-1 .0.2-shaded.jar -F "C:\PDFKonv\temp" -L "C:\logs\log.txt" http://APP204800:8080 -V "info"

    10:33:30.027 [main] ERROR c.d.standalone.StandaloneServer - The documents4j server terminated with a n unexpected error joptsimple.OptionArgumentConversionException: Cannot parse argument 'C:\logs\log.txt' of option [arg uments] . . Error: Cannot parse argument 'C:\logs\log.txt' of option [arguments]

    Use option -? to display a list of legal commands.

    For comparison, this is how the command outputs on the version 0.2.1

    C:\PDFKonv>"C:\Program Files\Java\jre1.8.0_91\bin\java.exe" -jar documents4j-server-standalone-0.2.1 -shaded.jar -F "C:\PDFKonv\temp" -L "C:\logs\log.txt" http://APP204800:8080 -V "info" Logging: The log is written to C:\logs\log.txt Logging: The log level is set to INFO Welcome to the documents4j server! on jul 13 10:39:09 CEST 2016: Started server on 'http://APP204800:8080' The documents4j server is up and running. Hit the enter key to shut it down...

    bug 
    opened by torefredriksen 6
  • Too many

    Too many "winword.exe" zombie processes

    PR https://github.com/documents4j/documents4j/pull/137 seems wrong and needed to be rolled back.

    The MS official documentation of GetObject function reads:

    Syntax GetObject([ pathname ], [ class ])

    If pathname is a zero-length string (""), GetObject returns a new object instance of the specified type. If the pathname argument is omitted, GetObject returns a currently active object of the specified type.

    In three occurrences of GetObject function where this PR modifies, we all want to find an existing currently running MS Word instance. In fact, this PR causes word_shutdown.vbs not actually work because it would create a new instance and quit the new one then, however, we should quit the existing instance instead. As a result of failing cleanup, we may end up with many winword.exe zombie processes.

    Originally posted by @charles-wangkai in https://github.com/documents4j/documents4j/issues/137#issuecomment-1200452690

    opened by charles-wangkai 5
  • Remote converter failing

    Remote converter failing

    I have a stand-alone server running on a local machine. That is a Windows machine and have word installed.

        java -jar documents4j-server-standalone-shaded.jar http://192.168.100.9:9998
    

    And then I am doing this in Java project. This is a Linux machine.

     IConverter converter = RemoteConverter.builder()
    //                .workerPool(20, 25, 60, TimeUnit.SECONDS)
    //                .requestTimeout(10, TimeUnit.SECONDS)
                    .baseUri("http://192.168.100.9:9998")
                    .build();
            Future<Boolean> conversion = converter
                    .convert(inputFile).as(DocumentType.MS_WORD)
                    .to(outputFile).as(DocumentType.PDF)
                    .schedule();
            conversion.get();
    
    17:57:57.984 [main] INFO com.documents4j.job.RemoteConverter - The documents4j remote converter has started successfully (URI: http://192.168.100.9:9998/)
    java.util.concurrent.ExecutionException: Could not complete conversion
    	at com.documents4j.job.FailedConversionFuture.get(FailedConversionFuture.java:35)
    	at com.documents4j.job.FailedConversionFuture.get(FailedConversionFuture.java:10)
    	at com.documents4j.job.AbstractFutureWrappingPriorityFuture.get(AbstractFutureWrappingPriorityFuture.java:205)
    	at com.documents4j.job.AbstractFutureWrappingPriorityFuture.get(AbstractFutureWrappingPriorityFuture.java:10)
    	at com.stcs.lld.util.AutomationUtils.generateRemotePDF(AutomationUtils.java:283)
    	at com.stcs.lld.util.AutomationUtilsTest.generateRemotePDF(AutomationUtilsTest.java:22)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
    	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
    	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
    	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
    	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
    	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
    	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
    	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
    	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:212)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:208)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    	at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
    	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    	at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
    	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
    	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
    	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
    	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
    	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
    	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
    	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
    	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
    	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
    	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
    	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
    Caused by: javax.ws.rs.ProcessingException: java.lang.NullPointerException
    	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.filterRequest(ClientInvocation.java:692)
    	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:485)
    	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.lambda$executorSubmit$11(ClientInvocation.java:765)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    	at java.base/java.lang.Thread.run(Thread.java:832)
    Caused by: java.lang.NullPointerException
    	at org.glassfish.jersey.client.filter.EncodingFilter.getSupportedEncodings(EncodingFilter.java:84)
    	at org.glassfish.jersey.client.filter.EncodingFilter.filter(EncodingFilter.java:58)
    	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.filterRequest(ClientInvocation.java:679)
    	... 6 more
    
    opened by waqasraz 4
  • documents4j in docker container

    documents4j in docker container

    Hello @raphw , Thanks for this repo. Is it possible to run documents4j in docker Linux container? If it's not possible then what are the alternates for Linux docker container?

    question 
    opened by dupinder 4
  • Maven Tests fail during build

    Maven Tests fail during build

    Hi,

    In preparation of working on Issue #126, I just checked out a fresh version of the code, to run mvn package ms-office

    Unfortunately the build fails for me in the Microsoft Word tests (the conversions seem to be fine, however the shutdown seems broken:

    
    Running com.documents4j.conversion.msoffice.MicrosoftWordConversionTest
    Tests run: 3, Failures: 2, Errors: 1, Skipped: 0, Time elapsed: 2.036 sec <<< FAILURE! - in com.documents4j.conversion.msoffice.MicrosoftWordConversionTest
    com.documents4j.conversion.msoffice.MicrosoftWordConversionTest  Time elapsed: 2.033 sec  <<< FAILURE!
    java.lang.AssertionError: Unexpected state: MS Office component is running expected:<-6> but was:<3>
            at org.junit.Assert.fail(Assert.java:89)
            at org.junit.Assert.failNotEquals(Assert.java:835)
            at org.junit.Assert.assertEquals(Assert.java:647)
            at com.documents4j.conversion.msoffice.MicrosoftOfficeAssertionEngine.assertNotRunning(MicrosoftOfficeAssertionEngine.java:36)
            at com.documents4j.conversion.msoffice.AbstractMicrosoftOfficeAssertingTest.setUp(AbstractMicrosoftOfficeAssertingTest.java:26)
            at com.documents4j.conversion.msoffice.AbstractMicrosoftOfficeBasedTest.setUp(AbstractMicrosoftOfficeBasedTest.java:37)
            at com.documents4j.conversion.msoffice.MicrosoftWordConversionTest.setUpConverter(MicrosoftWordConversionTest.java:48)
    
    com.documents4j.conversion.msoffice.MicrosoftWordConversionTest  Time elapsed: 2.035 sec  <<< ERROR!
    java.lang.NullPointerException: null
            at com.documents4j.conversion.msoffice.AbstractMicrosoftOfficeBasedTest.tearDownConverter(AbstractMicrosoftOfficeBasedTest.java:53)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
            at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
            at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
            at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
            at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
            at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
            at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
            at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
            at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
            at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
            at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
            at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
            at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
    
    
    

    And some more. Also they vary a little bit with each execution... Any idea what's wrong? Seems to me more like a scheduling problem than a real fail...

    Is there a possibility to skip certain tests, or to just execute specific tests of a module?

    Best Jan-Patrick

    Here the surefire logs for complete stacks: com.documents4j.conversion.msoffice.MicrosoftWordStartStopTest.txt com.documents4j.conversion.msoffice.MicrosoftWordConversionTest.txt com.documents4j.conversion.msoffice.MicrosoftWordInaccessibilityTest.txt

    opened by jposterloh 3
  • document4j not working with WSH version 5.8

    document4j not working with WSH version 5.8

    This method is returning GetObject(,"Excel.Application") 429 Error on window server 2019.

    After looking into this link, We are getting the value of 0 :

    https://social.technet.microsoft.com/Forums/ie/en-US/4e45e0de-a480-4301-a618-a480175a44b9/microsoft-vbscript-runtime-error-activex-component-cant-create-object-getobject?forum=ITCG.

    Can you make changes to this?

    opened by deepak-csols 2
  • Error The input file seems to be corrupt

    Error The input file seems to be corrupt

    error when convert docx to pdf this my code

        IConverter converter = LocalConverter
        		.builder()
        		.baseFolder(new File(path))
        		.build();
    
        Future<Boolean> conversion = converter
                .convert(in).as( DocumentType.DOCX ) // MS_EXCEL , MS_WORD
                .to(bo).as( DocumentType.PDF )
                .prioritizeWith( 1000 ) // optional 
                .schedule();
        
        conversion.get();
        
        try (OutputStream outputStream = new FileOutputStream( createFolderName + "/XXXX_" + pageNo + ".pdf")) {
            bo.writeTo(outputStream);
        } catch (IOException e) {
            e.printStackTrace();
        }
    

    [3/11/22 15:42:27:950 ICT] 00001455 SystemOut O 2022-03-11 15:42:27.950 DEBUG 19352 --- [ool-42-thread-1] org.zeroturnaround.exec.ProcessExecutor : Started java.lang.ProcessImpl@f7bc03a5 [3/11/22 15:42:27:952 ICT] 00001455 SystemOut O 2022-03-11 15:42:27.952 TRACE 19352 --- [ool-42-thread-1] c.d.j.LocalFutureWrappingPriorityFuture : Context fetched for source D:\DataEntry\Fire\Covernote\Tmp\7c1eac8b-29f8-4138-9cf5-97e5c5f79145\temp1: com.documents4j.job.LocalConversionContext@93dc674e [3/11/22 15:42:27:952 ICT] 00001455 SystemOut O 2022-03-11 15:42:27.952 TRACE 19352 --- [ool-42-thread-1] c.d.j.LocalFutureWrappingPriorityFuture : Underlying future created for source D:\DataEntry\Fire\Covernote\Tmp\7c1eac8b-29f8-4138-9cf5-97e5c5f79145\temp1: com.documents4j.conversion.ProcessFutureWrapper@dac26803 [3/11/22 15:42:27:952 ICT] 00001455 SystemOut O 2022-03-11 15:42:27.952 TRACE 19352 --- [ool-42-thread-1] c.d.j.LocalFutureWrappingPriorityFuture : Blocking during external conversion for source D:\DataEntry\Fire\Covernote\Tmp\7c1eac8b-29f8-4138-9cf5-97e5c5f79145\temp1: com.documents4j.conversion.ProcessFutureWrapper@dac26803 [3/11/22 15:42:27:952 ICT] 00001456 SystemOut O 2022-03-11 15:42:27.952 TRACE 19352 --- [ Thread-3869] o.z.exec.stream.StreamPumper : org.zeroturnaround.exec.stream.StreamPumper@afd2e332 started. [3/11/22 15:42:27:953 ICT] 00001457 SystemOut O 2022-03-11 15:42:27.953 TRACE 19352 --- [ Thread-3870] o.z.exec.stream.StreamPumper : org.zeroturnaround.exec.stream.StreamPumper@858db8ed started. [3/11/22 15:42:28:096 ICT] 00001457 SystemOut O 2022-03-11 15:42:28.096 TRACE 19352 --- [ Thread-3870] o.z.exec.stream.StreamPumper : org.zeroturnaround.exec.stream.StreamPumper@858db8ed finished. [3/11/22 15:42:28:097 ICT] 00001456 SystemOut O 2022-03-11 15:42:28.096 TRACE 19352 --- [ Thread-3869] o.z.exec.stream.StreamPumper : org.zeroturnaround.exec.stream.StreamPumper@afd2e332 finished. [3/11/22 15:42:28:100 ICT] 00001459 SystemOut O 2022-03-11 15:42:28.099 DEBUG 19352 --- [ssImpl@f7bc03a5] org.zeroturnaround.exec.WaitForProcess : java.lang.ProcessImpl@f7bc03a5 stopped with exit code -2 [3/11/22 15:42:28:100 ICT] 00001459 SystemOut O 2022-03-11 15:42:28.100 TRACE 19352 --- [ssImpl@f7bc03a5] o.z.exec.stream.PumpStreamHandler : Joining output thread Thread[Thread-3869,5,]... [3/11/22 15:42:28:100 ICT] 00001459 SystemOut O 2022-03-11 15:42:28.100 TRACE 19352 --- [ssImpl@f7bc03a5] o.z.exec.stream.PumpStreamHandler : Joining error thread Thread[Thread-3870,5,]... [3/11/22 15:42:28:100 ICT] 00001459 SystemOut O 2022-03-11 15:42:28.100 TRACE 19352 --- [ssImpl@f7bc03a5] o.z.exec.stream.PumpStreamHandler : Flushing output stream org.apache.commons.io.output.TeeOutputStream@1dce5ed4... [3/11/22 15:42:28:100 ICT] 00001459 SystemOut O 2022-03-11 15:42:28.100 TRACE 19352 --- [ssImpl@f7bc03a5] o.z.exec.stream.PumpStreamHandler : Flushing error stream org.zeroturnaround.exec.stream.slf4j.Slf4jInfoOutputStream@fda0d10b... [3/11/22 15:42:28:102 ICT] 00001455 SystemOut O 2022-03-11 15:42:28.102 TRACE 19352 --- [ool-42-thread-1] c.d.j.LocalFutureWrappingPriorityFuture : Conversion caused an error

    java.util.concurrent.ExecutionException: The conversion finished unsuccessful at com.documents4j.conversion.ProcessFutureWrapper.evaluateExitValue(ProcessFutureWrapper.java:50) ~[documents4j-util-transformer-process-1.0.3.jar:na] at com.documents4j.conversion.ProcessFutureWrapper.get(ProcessFutureWrapper.java:36) ~[documents4j-util-transformer-process-1.0.3.jar:na] at com.documents4j.conversion.ProcessFutureWrapper.get(ProcessFutureWrapper.java:11) ~[documents4j-util-transformer-process-1.0.3.jar:na] at com.documents4j.job.AbstractFutureWrappingPriorityFuture.run(AbstractFutureWrappingPriorityFuture.java:78) ~[documents4j-util-conversion-1.0.3.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160) [na:1.8.0] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [na:1.8.0] at java.lang.Thread.run(Thread.java:822) [na:2.9 (11-02-2020)] Caused by: com.documents4j.throwables.ConversionInputException: The input file seems to be corrupt at com.documents4j.util.Reaction$ConversionInputExceptionBuilder.make(Reaction.java:159) ~[documents4j-util-all-1.0.3.jar:na] at com.documents4j.util.Reaction$ExceptionalReaction.apply(Reaction.java:75) ~[documents4j-util-all-1.0.3.jar:na] at com.documents4j.conversion.ExternalConverterScriptResult.resolve(ExternalConverterScriptResult.java:70) ~[documents4j-transformer-api-1.0.3.jar:na] at com.documents4j.conversion.ProcessFutureWrapper.evaluateExitValue(ProcessFutureWrapper.java:48) ~[documents4j-util-transformer-process-1.0.3.jar:na] ... 6 common frames omitted

    opened by CIT00 3
  • Improve quality of some images while converting docx to pdf

    Improve quality of some images while converting docx to pdf

    We had an issue at work with one installation of the standalone server. Some images had a low quality after the conversion from docx to pdf. An upgrade to the latest version hasn't changed anything. What solved the issue in our case was a change in the word_convert.vbs file. The line wordDocument.ExportAsFixedFormat outputFile, WdExportFormatPDF, False, , , , , , , , , , , True has been replaced by wordDocument.SaveAs2 outputFile, WdExportFormatPDF, True, , False, , , True. I'm not an expert with visual basic and the skripting API for Word so this may not be the right solution for everyone but maybe someone can use it to solve a similar issue.

    opened by asopicki 1
  • An Inefficient Usage of ArrayList

    An Inefficient Usage of ArrayList

    Hi, We find that there are two List objects in the file AggregatingConverter.java which are inserted in a loop. Due to the memory reallocation triggered in the successive insertions, the time complexity of add method of ArrayList is amortized O(1). We notice that these two ArrayList objects are only used for traversal and the retrieval for the first element. This functionality can be implemented by LinkedList. Moreover, the insertion of LinkedList is strictly O(1) time complexity because no memory reallocation occurs.

    We discovered this inefficient usage of containers by our tool Ditto. The patch is submitted in #127. Could you please check and accept it? We have tested the patch on our PC. The patched program works well.

    Bests

    Ditto

    opened by FastAtlas 0
Releases(documents4j-1.1.9)
Owner
documents4j
documents4j is a document format converter for Java
documents4j
HMFF - A Hierarchical Mapping File Format

HMFF - A Hierarchical Mapping File Format This library provides a recursive key-value interpretation for your configuration files, with comment suppor

Justis R 3 Oct 23, 2021
Pass variables into methods based off name, not position.

Named Arguments are a feature that many languages lack. Some call it Feature Envy. The Problem You have a menu() method that prints out a 5 option men

Xavier D 3 Jul 1, 2022
A Parser tool which actually tries to convert XML data into JSON data

SpringBoot A Parser tool which actually tries to convert XML data into JSON data Tools Required Postman (Testing API's) IDE - Eclipse / NetBeans/ Inte

null 1 Jan 27, 2022
Diff Utils library is an OpenSource library for performing the comparison / diff operations between texts or some kind of data: computing diffs

Diff Utils library is an OpenSource library for performing the comparison / diff operations between texts or some kind of data: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future displaying (like side-by-side view) and so on.

null 951 Jan 5, 2023
An open-source Java library for Constraint Programming

Documentation, Support and Issues Contributing Download and installation Choco-solver is an open-source Java library for Constraint Programming. Curre

null 607 Jan 3, 2023
Java rate limiting library based on token/leaky-bucket algorithm.

Java rate-limiting library based on token-bucket algorithm. Advantages of Bucket4j Implemented on top of ideas of well known algorithm, which are by d

Vladimir Bukhtoyarov 1.7k Jan 8, 2023
A Java library for designing good error messages

JDoctor, a Java library for good error messages Designing good error messages is hard. In Java, most often, developers just rely on throwing exception

Cédric Champeau 125 Oct 24, 2022
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

null 1.5k Jan 4, 2023
Ta4j is an open source Java library for technical analysis

Ta4j is an open source Java library for technical analysis. It provides the basic components for creation, evaluation and execution of trading strategies.

null 1.7k Dec 31, 2022
hella-html is a library that makes it hella easy to generate dynamic HTML in vanilla Java.

Hella easy HTML in Java hella-html is a library that makes it hella easy to generate dynamic HTML in vanilla Java. Very lightweight and fast, the prim

null 1 Nov 23, 2022
java common utils library

java-common-utils java common utils library 一个简单的Java通用工具类,目前的设想,包括简化异常处理工具、简易限流处理工具等 ExceptionHandler, 目标简化try catch的代码冗余度

xuangy 2 Jan 21, 2022
A Java API for checking if text contains profanity via the alt-profanity-checker Python library.

ProfanityCheckerAPI A Java API for checking if text contains profanity via the alt-profanity-checker Python library. It uses jep to run and interpret

William 2 Feb 19, 2022
High performance I/O library for Java using io_uring under the hood

nio_uring nio_uring is an I/O library for Java that uses io_uring under the hood, which aims to be: A simple and flexible API Super fast and efficient

Blake Beaupain 65 Dec 18, 2022
archifacts is a library to extract your architectural concepts out of your application's code

archifacts is a free (Apache 2.0 license) library for describing and detecting architectural building blocks and their relationships in your Java appl

null 45 Nov 29, 2022
Java lib for monitoring directories or individual files via java.nio.file.WatchService

ch.vorburger.fswatch Java lib for monitoring directories or individual files based on the java.nio.file.WatchService. Usage Get it from Maven Central

Michael Vorburger ⛑️ 21 Jan 7, 2022
Tencent Kona JDK11 is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-Term Support(LTS) with quarterly updates. Tencent Kona JDK11 is certified as compatible with the Java SE standard.

Tencent Kona JDK11 Tencent Kona JDK11 is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-Term Support(LTS) w

Tencent 268 Dec 16, 2022
This repository contains Java programs to become zero to hero in Java.

This repository contains Java programs to become zero to hero in Java. Data Structure programs topic wise are also present to learn data structure problem solving in Java. Programs related to each and every concep are present from easy to intermidiate level

Sahil Batra 15 Oct 9, 2022
Java Constraint Programming solver

https://maven-badges.herokuapp.com/maven-central/org.jacop/jacop/badge.svg [] (https://maven-badges.herokuapp.com/maven-central/org.jacop/jacop/) JaCo

null 202 Dec 30, 2022
Java Constraint Solver to solve vehicle routing, employee rostering, task assignment, conference scheduling and other planning problems.

OptaPlanner www.optaplanner.org Looking for Quickstarts? OptaPlanner’s quickstarts have moved to optaplanner-quickstarts repository. Quick development

KIE (Drools, OptaPlanner and jBPM) 2.8k Jan 2, 2023