Bug 68647 - Other: Batch convert of --convert-to in terminal mode does not work
Summary: Other: Batch convert of --convert-to in terminal mode does not work
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version: 3.6.6.2 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-28 09:20 UTC by Wolf.Kuerschner
Modified: 2013-09-06 05:07 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Wolf.Kuerschner 2013-08-28 09:20:41 UTC
Problem description: 

soffice --headless --convert-to pdf *.odt does not produce output

But 

soffice --headless --convert-to pdf test.odt does produce test.pdf

(on the same computer running Win XP Pro - German version)

Steps to reproduce:
1. Open terminal (Start-> cmd) and go to the folder with soffice
2. enter the statement from above

Current behavior:

no output produced, independent of the output file type (I tested different ones)

Expected behavior:

all *.odt file in the folder should be converted to .pdf files

              
Operating System: Windows XP
Version: 4.1.0.4 release
Comment 1 Julien Nabet 2013-08-30 05:51:04 UTC
On pc Debian x86-64 with master sources updated today and with 4.1 sources updated some days ago, I didn't reproduce this problem.

I created 2 documents test1.odt and test2.odt when using "soffice --headless --convert-to pdf *.odt", I had 2 files. (test1.pdf and test2.pdf)

For the test, could you give a try to new LO version 4.1.1?
Comment 2 Wolf.Kuerschner 2013-09-02 12:53:06 UTC
Hi,

I tested it on LO 3.6 and now on LO 4.1.1.2 (two different PC, Win XP Pro 32), and as before: no PDFs created...
Comment 3 Wolf.Kuerschner 2013-09-02 13:08:43 UTC
maybe * is not recognized?
Comment 4 Julien Nabet 2013-09-02 16:45:32 UTC
Thank you Wolf for your feedback, I put it back to UNCONFIRMED since I don't have more questions.
BTW, "*" worked for me.
Comment 5 Wolf.Kuerschner 2013-09-03 09:25:13 UTC
yes, "*" works for me nicely in the command line, too. Except that it looks as if LO does not recognize it. If I just add several file names, all of them are converted to PDFs. Somehow LO is not capable to understand that *.odt has to be read as Test.odt, Test2.odt??
Comment 6 Julien Nabet 2013-09-03 18:14:09 UTC
Ok I reproduced this with LO 4.0.5 on Win7 but not on Linux. I suppose Windows only bug.
Since you reproduced this on 3.6, I put version to 3.6.6.2 since version must contain the oldest version where the bug can be reproduced.
Comment 7 Julien Nabet 2013-09-03 18:17:55 UTC
Riccardo: one for you?
Comment 8 Riccardo Magliocchetti 2013-09-03 18:23:32 UTC
(In reply to comment #7)
> Riccardo: one for you?

The issue with --convert-to is that it use a different code path than what you are doing using unoconv. Unfortunately I have no clue / time to investigate that.
Comment 9 Julien Nabet 2013-09-03 20:25:21 UTC
Michael: do you know who may help here?
BTW, I tried a gdb session because I saw in the file desktop/source/app/app.cxx this
   2611     // Add path separator to these directory and make given URL (rName) absolute by using of current working directory
   2612     // Attention: "setFinalSlash()" is necessary for calling "smartRel2Abs()"!!!
   2613     // Otherwhise last part will be ignored and wrong result will be returned!!!
   2614     // "smartRel2Abs()" interpret given URL as file not as path. So he truncate last element to get the base path ...
   2615     // But if we add a separator - he doesn't do it anymore.
   2616     INetURLObject aObj;
(see http://opengrok.libreoffice.org/xref/core/desktop/source/app/app.cxx#2610)
I thought the problem might be there but I don't know how to display OUString or simple String (I gave a try to https://wiki.documentfoundation.org/Development/How_to_debug#Dumping_Strings_.28etc.29 but I didn't succeed in making gdb display anything useful)
Comment 10 Julien Nabet 2013-09-06 05:07:39 UTC
Michael: sorry for the noise about gdb printers, I had just to read the gdb warnings. I created ~/.gdbinit and added this line:
set auto-load safe-path /


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.