sivanthiinfowave / jodconverter

Automatically exported from code.google.com/p/jodconverter
0 stars 0 forks source link

V3b4 - Cannot convert HTML -> PDF in web service #102

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Before creating a new issue, please post your problem to the group for
discussion first.

http://groups.google.com/group/jodconverter

What steps will reproduce the problem?
1. Install software (correctly)
2. Compile and Deploy sample web service
3. Try to compile HTML file (attached)

What is the expected output? What do you see instead?

I get the following error:

 Exception report

message

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception

javax.servlet.ServletException: conversion failed
    org.artofsolving.jodconverter.sample.web.ConverterServlet.doPost(ConverterServlet.java:68)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause

org.artofsolving.jodconverter.office.OfficeException: could not store document: 
errorfile1671988129190743477.pdf; errorCode: 2074
    org.artofsolving.jodconverter.AbstractConversionTask.storeDocument(AbstractConversionTask.java:125)
    org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:61)
    org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:80)
    java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    java.util.concurrent.FutureTask.run(FutureTask.java:166)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    java.lang.Thread.run(Thread.java:636)
root cause

com.sun.star.task.ErrorCodeIOException: 
    com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:177)
    com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:143)
    com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:335)
    com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:304)
    com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:91)
    com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:639)
    com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:151)
    com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:133)
    $Proxy13.storeToURL(Unknown Source)
    org.artofsolving.jodconverter.AbstractConversionTask.storeDocument(AbstractConversionTask.java:123)
    org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:61)
    org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:80)
    java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    java.util.concurrent.FutureTask.run(FutureTask.java:166)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    java.lang.Thread.run(Thread.java:636)

What version of the product are you using? On what operating system?
Version 3 Beta 4

Please provide any additional information below.

Same also happens when .html file is saved as .doc file.

Original issue reported on code.google.com by shafiq...@gmail.com on 15 Jan 2012 at 3:46

Attachments:

GoogleCodeExporter commented 8 years ago
The same error but when trying to convert form command line.

Exception in thread "main" 
org.artofsolving.jodconverter.office.OfficeException: could not store document: 
test.ppt.html; errorCode: 2074

I am trying to convert an ppt file to html.

The system is CentOS
Jodconverter is version 3.0 beta4
OO verson 3.1.1, 64bit package

Original comment by erani.m...@gmail.com on 31 Jan 2012 at 3:41

GoogleCodeExporter commented 8 years ago
related to previous comment:

the stack trace is:

Exception in thread "main" 
org.artofsolving.jodconverter.office.OfficeException: could not store document: 
test.html; errorCode: 2074
        at org.artofsolving.jodconverter.AbstractConversionTask.storeDocument(AbstractConversionTask.java:125)
        at org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:61)
        at org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:80)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: com.sun.star.task.ErrorCodeIOException:
        at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:177)
        at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:143)
        at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:335)
        at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:304)
        at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:91)
        at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:639)
        at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:151)
        at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:133)
        at $Proxy7.storeToURL(Unknown Source)
        at org.artofsolving.jodconverter.AbstractConversionTask.storeDocument(AbstractConversionTask.java:123)
        ... 8 more

it seems that the problem is in OO

Original comment by erani.m...@gmail.com on 31 Jan 2012 at 3:48

GoogleCodeExporter commented 8 years ago
Hello,

we had similar issue.
OpenOffice 3.3 and LibreOffice 3.4 were producing same error.

The upgrade to LibreOffice 3.5 solved the problem for us. Now we can convert 
HTML files to PDF/DOC/etc.

If you by any chance will find any workaround to make it work also with 
OpenOffice 3.3, let me know, please.

Kind regards
Sergiy

Original comment by Sergiy.Shyrkov on 23 Feb 2012 at 11:48

GoogleCodeExporter commented 8 years ago
Hello once again,

finally I've been able to detect the issue (with the help of info at 
http://user.services.openoffice.org/en/forum/viewtopic.php?f=20&t=1149#p5529 ).
In case of the HTML input document another export filter should be used 
("writer_web_pdf_Export" instead of "writer_pdf_Export") when converting to PDF 
(as well as to OpenDocument and Text)

The attached patch (against 3.0-beta-4 codebase) solved the problem for us.

Kind regards
Sergiy

Sergiy Shyrkov
Product Development
---------------------------------
Jahia Solutions Group
web: http://www.jahia.com
---------------------------------
Jahia's next-generation, open source CMS stems from a widely acknowledged 
vision of enterprise application convergence – web, search, document, social 
and portal – unified by the simplicity of web content management. 

Original comment by Sergiy.Shyrkov on 23 Feb 2012 at 11:37

Attachments: