Questions tagged [documents4j]

documents4j is a library for converting documents into a different format using a pure Java API. Under the hood, it runs third-party applications to which it delegates the conversion. Currently, it ships with adapters for MS Word and MS Excel. The conversion can be executed locally or remotely via a REST service.

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.

58 questions
1
vote
1 answer

Converting documents via HTTP

With the documents4j-server running and listening at http://localhost:9998 is it possible to convert a document with a direct HTTP command? Example: http://localhost:9998?source=C:\Test.doc?target=C:\Test.pdf More info: I was a few steps ahead of…
0
votes
0 answers

WildFly application gives documents4j LocalConverter: ConversionInputException after a while

I have a Spring-based application running on WildFly as a Windows service. One of the APIs in my application utilizes documents4j LocalConverter to convert Word documents to PDF files. The conversion works perfectly when I start the WildFly service,…
Omar Raed
  • 149
  • 6
0
votes
0 answers

Tomcat war with documents4j IllegalStateExeption when converting file to rtf in Java

Hi I am trying to set documents4j as service on Windows by using Tomcat but it keeps failing. Task Scheduler job with no login needed setting is also failing. Error is below. java.lang.IllegalStateException: class…
Reppo
  • 1
0
votes
0 answers

Convert DOCX to PDF with documents4j (Which Internally uses VBScript for the conversion)

The following is the simple code snippet which I am trying to use to convert a DOCX file into a PDF on my local system, which is as it is picked up from http://documents4j.com/#/. Running this piece of code as a part of service inside a web app…
Anshu
  • 1
  • 2
0
votes
0 answers

Converting Docx4j to pdf via documents4j

java code to generate the conversion of word to pdf package com.sonakshi; import com.documents4j.api.DocumentType; import com.documents4j.api.IConverter; import com.documents4j.job.LocalConverter; import…
Sonakshi
  • 1
  • 1
0
votes
1 answer

Backing Conversion Software

the documents4j.com page states under 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…
Mark Glass
  • 386
  • 1
  • 7
  • 15
0
votes
2 answers

Why documents4j run test with maven occurs error

I using documents4j to convert docx to PDF, while run in IDEA, all is find, but when I run test with maven or jenkins, I got an error: java.lang.IllegalStateException: Shutdown in progress at…
Harry
  • 41
  • 2
  • 4
0
votes
1 answer

Documents4j java library in Android App to convert Docx to Pdf

I am trying to use Documents4j java library in my Android App to convert Docx format document to PDF file but the output pdf file is damaged or corrupted. The output pdf file is empty with 0 bytes. I am using the below code to convert Docx to pdf. …
0
votes
1 answer

RTF to PDF format convert using java in linux

I created a Java code to convert RTF format documents to PDF format. Program works properly in windows. But it gives error in linux. Can someone please show me the issue with this code ? Java code: import com.documents4j.api.DocumentType; import…
Anuradha
  • 570
  • 6
  • 20
0
votes
2 answers

documents4j not saving file after conversion

I have converted a .docx file to .pdf using documents4j however the pdf is not showing even the logs shows successful conversion. 26-Jun-2020 21:45:38.163 INFO [http-nio-80-exec-423] com.documents4j.conversion.msoffice.MicrosoftWordBridge.startUp…
Mo Alex
  • 14
  • 5
0
votes
1 answer

java.lang.IllegalAccessError: class org.slf4j.LoggerFactory tried to access private field org.slf4j.impl.StaticLoggerBinder.SINGLETON

i am trying to convert MS word to PDF using documents4j. using a java program, compiling and running the code through cmd the file is being generated with no issues. however, when i am running the same file on tomcat, i am getting the below…
Mo Alex
  • 14
  • 5
0
votes
0 answers

Why log out when using documents4j library in spring mvc project

I using Spring MVC web project and I need the documents4j library when converting the docx file to pdf. Documents4j can convert docx to pdf properly but then my web session is logged out. Does anyone know why? I'am using Spring mvc web structure…
Ozdenur
  • 15
  • 7
0
votes
1 answer

documents4j xls xlsx date conversion

When converting from xls to xlsx with documents4j, columns containing a date format of category Custom with a type of dd-mmm-yyyy are being converted to a numeric value - in my case, 24-Nov-1990 in the xls doc becomes 33201 in the xlsx doc. Any…
0
votes
3 answers

Exception in thread "main" java.lang.Error: Unresolved compilation problem: LocalConverter cannot be resolved

I am trying to convert Docx file to pdf file in java using documents4j 1.0.3.jar, but I can't to able to convert that. I saw some references, everyone suggesting to do in the maven project with pom file dependencies. we don't maven project, I want…
Vicky Johnson
  • 13
  • 1
  • 4
0
votes
1 answer

Documents4j Remote Converter : Pdf file generated broken, can't open it

I've tried to convert a simple docx file to PDF through this code : try { InputStream in = testXdocReportDoc.class.getResourceAsStream("testXdocReportDocV2.docx"); IXDocReport report = XDocReportRegistry.getRegistry().loadReport(in,…