Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem converting txt files (ErrCode 2074) #86

Closed
Yuseinov opened this issue Sep 12, 2012 · 19 comments
Closed

Problem converting txt files (ErrCode 2074) #86

Yuseinov opened this issue Sep 12, 2012 · 19 comments

Comments

@Yuseinov
Copy link

When converting txt files (without extension) to pdf files unoconv is crashing. When converting same file with extension, then everything is OK.
In other case if file have extension and is it link to file who don't have extension, then don't work.
This is only for txt files.

unoconv -f pdf 'file' - Not working
unoconv -f pdf 'file.txt' - Working

In installed unoconv error is:

unoconv: UnoException during conversion: 
The provided document cannot be converted to the desired format.

In last branch in gitHub the error is:

unoconv: UnoException during export phase:
Unable to store document to file:///home/developer/Desktop/a.pdf (ErrCode 2074)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"writer_pdf_Export" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x-4c64b9a4{, supportedInterfaces={com.sun.star.lang.XTypeProvider,com.sun.star.io.XOutputStream}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })
@dagwieers
Copy link
Member

Try opening the file without extension in LibreOffice. What happens ?

@dagwieers
Copy link
Member

Works for me on LibreOffice 3.6.1, try a newer LibreOffice ?

[dag@moria ~]$ echo "Blah" >blah.txt
[dag@moria ~]$ unoconv -f pdf blah.txt
[dag@moria ~]$ ls -l blah*
-rw-rw-r--. 1 dag dag 15672 Sep 12 14:56 blah.pdf
-rw-rw-r--. 1 dag dag     5 Sep 12 14:56 blah.txt
[dag@moria ~]$ mv blah.txt blah
[dag@moria ~]$ unoconv -f pdf blah
[dag@moria ~]$ ls -l blah*
-rw-rw-r--. 1 dag dag     5 Sep 12 14:56 blah
-rw-rw-r--. 1 dag dag 15672 Sep 12 14:57 blah.pdf

@dagwieers
Copy link
Member

Also works on LibreOffice 3.4.6 and LibreOffice 3.5.6...

@Yuseinov
Copy link
Author

I open file with OpenOffice 3.2 and work correct. But I can' t convert with unoconv.
Only one problem I have - when open file, open office showed me a dialog window an ASCII Filter Options. When click OK, the content is show.

@Yuseinov
Copy link
Author

When i create a file whit this echo "Blah" >blah.txt
unoconv -f pdf blah.txt - not work with or without extension.

@dagwieers
Copy link
Member

Ok, this seems to be a bug in OpenOffice then. I am not very inclined to help debug OpenOffice specific problems.

Maybe you can work around the 'dialog window' by using (Encoded) Text import filters.

@Yuseinov
Copy link
Author

I update OpenOffice to 3.4.1 (last) and error message changed:

unoconv: UnoException during conversion: URL seems to be an unsupported one.
The provided document cannot be converted to the desired format.
Segmentation fault

I can' t convert nothing after update.
unoconv -f txt blah.doc - not work anymore
unoconv -f doc blah.odt - not work anymore

This message is showing when i install unoconv whit sudo apt-get install unoconv.
If I don' t install unoconv, and use clone from git, everything is OK.
If i installed open office 3.4.1, and then install unoconv, office packet is missing.
When I install sudo apt-get install openoffice.org, then installed version 3.2. Now i can't convert txt file to pdf, but I can convert other files.
I can't install open office 3.4.1 from debian package, because i have 2 errors before installing deb: Error: Conflicts with the installed package 'openoffice.org-core' and Error: Conflicts with the installed package 'openoffice.org-common'. When I remove them unoconv is removing automatically whit them.

@dagwieers
Copy link
Member

I am confused about what versions of OpenOffice and what versions of unoconv have been used together. Without this information clearly indicated none of the above output is useful to me. Personally I am only interested in unoconv v0.6. What version does apt provide ?

Since a few months I do no longer test myself with OpenOffice, since the official RPM installation package seems to install in two directories instead of one: /opt/openoffice.org and /opt/openoffice.org3, from what I can see it should work using UNOPATH=/opt/openoffice.org but it doesn't. Another related problem is that the OpenOffice packages do not seem to allow to have more than one version to be co-installed.

@Yuseinov
Copy link
Author

Unoconv:
Installed version is 0.4.
Version from git is 0.6.
Open Office 3.2
I test with version from git and installed version of unoconv.

@dagwieers
Copy link
Member

I just installed the official OpenOffice 3.4.1 RPM packages and they work again using UNO_PATH=/opt/openoffice.org3, the results for this test is:

[dag@moria ~]$ echo "Blah" >blah.txt
[dag@moria ~]$ UNO_PATH=/opt/openoffice.org3 unoconv -f pdf blah.txt
[dag@moria ~]$ ls -l blah*
-rw-rw-r--. 1 dag dag 9186 Sep 13 12:09 blah.pdf
-rw-rw-r--. 1 dag dag    5 Sep 13 12:08 blah.txt
[dag@moria ~]$ mv blah.txt blah
[dag@moria ~]$ UNO_PATH=/opt/openoffice.org3 unoconv -f pdf blah
[dag@moria ~]$ ls -l blah*
-rw-rw-r--. 1 dag dag    5 Sep 13 12:08 blah
-rw-rw-r--. 1 dag dag 9186 Sep 13 12:09 blah.pdf

So all works as expected on my system using unoconv v0.6.

@Yuseinov
Copy link
Author

OK.
When I install open office 3.4.1 and use last unoconv release from git, work.

@Yuseinov
Copy link
Author

I have problem konverting symbolik link to file with no extension on new configuration.
Problem is like this: #18

unoconv: UnoException during export phase:
Unable to store document to file:///var/www/t1na53s7/bg.pdf (ErrCode 2074)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"writer_pdf_Export" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0xa4a826c{, supportedInterfaces={com.sun.star.lang.XTypeProvider,com.sun.star.io.XOutputStream}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"FilterOptions", Handle = (long)0x0, Value = (any){ (string)",,76" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })

@Yuseinov Yuseinov reopened this Sep 13, 2012
@dagwieers
Copy link
Member

Ok, I am getting a bit frustrated about all these reports, because every single one of them I try, simply works:

[dag@moria tests]$ ln -sf document-example.doc document-example
[dag@moria tests]$ unoconv -f pdf document-example
[dag@moria tests]$ ls -l document-example.doc document-example document-example.pdf
lrwxrwxrwx. 1 dag dag     20 Sep 13 18:06 document-example -> document-example.doc
-rw-rw-r--. 1 dag dag  44544 Sep 13 12:07 document-example.doc
-rw-rw-r--. 1 dag dag 558283 Sep 13 18:06 document-example.pdf

Even with OpenOffice 3.4.1:

[dag@moria tests]$ UNO_PATH=/opt/openoffice.org3 unoconv -f pdf document-example
[dag@moria tests]$ ls -l document-example.doc document-example document-example.pdf
lrwxrwxrwx. 1 dag dag     20 Sep 13 18:06 document-example -> document-example.doc
-rw-rw-r--. 1 dag dag  44544 Sep 13 12:07 document-example.doc
-rw-rw-r--. 1 dag dag 117576 Sep 13 18:08 document-example.pdf

@Yuseinov
Copy link
Author

I fixed it:
HOME=/tmp unoconv -f pdf document-example

@fomistoklus
Copy link

root@w ~ # uname -a
Linux w 2.6.32-5-openvz-amd64 #1 SMP Mon Mar 7 22:25:57 UTC 2011 x86_64 GNU/Linux
root@w~ # cat /etc/debian_version
6.0.7
Package: unoconv
Versions: 0.3-6

issue:
unoconv -f pdf test.doc
unoconv: UnoException during conversion: URL seems to be an unsupported one.
The provided document cannot be converted to the desired format.

aptitude install openoffice.org-writer will help you to fix the issue

@dagwieers dagwieers changed the title Problem converting txt files. Problem converting txt files (ErrCode 2074) Jul 5, 2015
@dagwieers
Copy link
Member

I am closing this issue. If you can still reproduce this error with the latest unoconv from the master branch, feel free to reopen this issue with the details to reproduce it.

Thanks for all the feedback !

@dchaplinsky
Copy link

I can:

$ HOME=/tmp /Applications/LibreOffice.app/Contents/MacOS/python /usr/local/bin/unoconv -f txt 0.pdf 
unoconv: UnoException during export phase:
Unable to store document to file:///Users/dchaplinsky/Projects/visnyk/0.txt (ErrCode 3088)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x7f896dc85a68{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvider}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"Text" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"FilterOptions", Handle = (long)0x0, Value = (any){ (string)"UTF8" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })

I'm using LibreOffice 4.3.7.2 for mac, installed from LibreOffice website and

$ unoconv --version
unoconv 0.7
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/unoconv/

platform posix/darwin
python 3.3.5 (default, Apr 21 2015, 04:57:06) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)]
LibreOffice 4.3.7.2

@dchaplinsky
Copy link

Ouch, excuse me, just saw your comment, that pdf cannot be exported to txt format with help of unoconv

@lalatbag
Copy link

lalatbag commented Dec 19, 2017

  1. Can Unoconv be installed in AIX server?
  2. Can it convert PDF file to text?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants