[libreoffice-users] Re: Command line (convert) parameter(s)
Hi, I know its an old thread, nevertheless I thought I will quickly answer these: For docx: -convert-to docx:Office Open XML Text For xlsx: -convert-to xlsx:Calc Office Open XML The parameters are filter names from filter/source/config/fragments/filters/ Regards, Muthu Subramanian -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
leif wrote: *Hi, For some reason I coulnd't make the *.doc to work. Instead I managed to create a batch file: Hi leif, apparently, the * (star) character won't work properly in Windows, according to http://muthusuba.blogspot.com/2011/03/so-called-hidden-features-of.html: quote [PS: wildcards wouldn't work correctly on windows specify the file names (list) instead.] end quote and here http://lists.freedesktop.org/archives/libreoffice/2011-April/009991.html: quote [Eg. we cannot expand wildcards on Windows, if I am not mistaken.] end quote If you're running Windows, this may explain why it wasn't working. Regards Stephan -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
Nuno J. Silva wrote: According to the code, only UNIX systems get the help text written to the console. Everything else gets a dialog box. ,[desktop/source/app/cmdlinehelp.cxx, line 154] | #ifdef UNX | // on unix use console for output | fprintf(stdout, %s%s, | [...] | #else | // rest gets a dialog box | CmdlineHelpDialog aDlg; ` Thanks Nuno. I must admit, I was suspecting Win7 of acting strangely. Thanks for clarifying the behaviour. Does anyone know a workaround to get the commands listed to the console rather than the dialogue box (in Windows)? Or maybe how to get *all* of the text from the help dialogue (not truncated)? Regards Stephan -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
Den 24-06-2011 23:31, NoOp skrev: -convert-to pdf:writer_pdf_Export -outdir /home/user *.doc *Hi, For some reason I coulnd't make the *.doc to work. Instead I managed to create a batch file: for %%f in (*.odt) do C:\LibO\program\soffice -invisible -convert-to pdf -outdir Output/ %%f Cheers, Leif Lodahl * -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
NoOp wrote: Not sure about Windows, but here is the output of the '--help' command in linux. I suspect that the same commands are also available in Windows. snip Thanks NoOp, that's what I was looking for. The message window I described only lists the options up to -infilter=filter along with its description. I suspect that the message window just truncates the text at some arbitrary value. Tom wrote: I think on Windows you can pipe commands although it's a bit different from gnulinux or bsd. I htink there is a way of piping output into a text-file but i don't know how. This might work tho soffice.exe -? | more The |more option does work when listing help for other types of commands (such as help |more), but unfortunately it doesn't work in this case. The main difference in this case is that the help text is not echoed to the prompt (terminal), but it is rather displayed in a message pop-up, which truncates (cuts off) the text at some point. Nuno J. Silva wrote: Lee, try with only one dash. (Yes, I'd not expect only a single dash for long options, but it seems that this was, until recently, the way LibO/OOo did it.) Just for interest's sake, on the Win7 system I'm using (running LibreOfficePortable 3.3.2), the help options specify single dashes, not double dashes. Not sure if it is OS or LibO-version specific. Regards Stephan -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
On 2011-06-27, Stephan Zietsman wrote: Tom wrote: I think on Windows you can pipe commands although it's a bit different from gnulinux or bsd. I htink there is a way of piping output into a text-file but i don't know how. This might work tho soffice.exe -? | more The |more option does work when listing help for other types of commands (such as help |more), but unfortunately it doesn't work in this case. The main difference in this case is that the help text is not echoed to the prompt (terminal), but it is rather displayed in a message pop-up, which truncates (cuts off) the text at some point. According to the code, only UNIX systems get the help text written to the console. Everything else gets a dialog box. ,[desktop/source/app/cmdlinehelp.cxx, line 154] | #ifdef UNX | // on unix use console for output | fprintf(stdout, %s%s, | [...] | #else | // rest gets a dialog box | CmdlineHelpDialog aDlg; ` -- Nuno J. Silva (aka njsg) gopher://sdf-eu.org/1/users/njsg -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
Hi :) I think it might be the file-name pdf that might be wrong? Try ls or dir to check the file-name. I suspect the correct file-name is either .pdf or pdf.pdf Regards from Tom :) From: lee l...@yun.yagibdah.de To: users@global.libreoffice.org Sent: Sat, 25 June, 2011 3:03:04 Subject: Re: [libreoffice-users] Re: Command line (convert) parameter(s) NoOp gl...@sbcglobal.net writes: On 06/22/2011 02:33 AM, Stephan Zietsman wrote: --convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files Batch convert files. If -outdir is not specified then current working dir is used as output_dir. Eg. -convert-to pdf *.doc -convert-to pdf:writer_pdf_Export -outdir /home/user *.doc This doesn't work: , | lee@yun:~/tmp$ libreoffice --headless --convert-to pdf test.odt ` ... pops up a dialogue box saying /home/lee/tmp/pdf does not exist. Please note the --headless option; it's another bug that it pops up a dialogue box nonetheless. Please note that in the example, it's -convert-to. So what should it be, --convert-to or -convert-to? -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
Hi :) The error message is very specific. It says /home/lee/tmp/pdf does not exist which means there is no file called pdf in the /home/lee/tmp folder. Maybe he has missed the ending of the file-name. Or maybe he is looking in the wrong folder. Regards from Tom :) From: Nuno J. Silva nunojsi...@ist.utl.pt To: users@global.libreoffice.org Sent: Sat, 25 June, 2011 12:06:54 Subject: Re: [libreoffice-users] Re: Command line (convert) parameter(s) On 2011-06-25, Tom Davies wrote: lee l...@yun.yagibdah.de wrote: NoOp gl...@sbcglobal.net writes: --convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files This doesn't work: , | lee@yun:~/tmp$ libreoffice --headless --convert-to pdf test.odt ` ... pops up a dialogue box saying /home/lee/tmp/pdf does not exist. [...] I think it might be the file-name pdf that might be wrong? Try ls or dir to check the file-name. I suspect the correct file-name is either .pdf or pdf.pdf According to the documentation NoOp quoted, the pdf is supposed to be just the extension. -- Nuno J. Silva (aka njsg) gopher://sdf-eu.org/1/users/njsg -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
Tom Davies tomdavie...@yahoo.co.uk writes: The error message is very specific. It says /home/lee/tmp/pdf does not exist which means there is no file called pdf in the /home/lee/tmp folder. Maybe he has missed the ending of the file-name. Or maybe he is looking in the wrong folder. The message is even correct, only that's besides the point considering what I was telling LO to do :) -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
Tom Davies tomdavie...@yahoo.co.uk writes: Ahah. Ok, have you tried a single - as well as a doubled one -- ? Did that just confuse it so that it outputs the quick help thing again? or did it just appear to do nothing? Always top-posting ... No, I haven't tried a single - because that won't make sense. There's no single - with options that have a - in their names. Well, I just tried, and it works. Still either the help text or the option needs to be fixed, and that --headless doesn't do what it's supposed to as well ... -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Command line (convert) parameter(s)
On Sat, 25 Jun 2011 13:58:14 +0200, lee wrote: Tom Davies tomdavie...@yahoo.co.uk writes: The error message is very specific. It says /home/lee/tmp/pdf does not exist which means there is no file called pdf in the /home/lee/tmp folder. Maybe he has missed the ending of the file-name. Or maybe he is looking in the wrong folder. The message is even correct, only that's besides the point considering what I was telling LO to do :) The problem is the OP used double hyphens, when LO requires a single hyphen, even for long options. $ libreoffice -headless -convert-to pdf foo.odt works fine. -jh -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
On 2011-06-25, Jonathan) {$@(R.)daria.co.uk (Hudson wrote: On Sat, 25 Jun 2011 13:58:14 +0200, lee wrote: Tom Davies tomdavie...@yahoo.co.uk writes: The error message is very specific. It says /home/lee/tmp/pdf does not exist which means there is no file called pdf in the /home/lee/tmp folder. Maybe he has missed the ending of the file-name. Or maybe he is looking in the wrong folder. The message is even correct, only that's besides the point considering what I was telling LO to do :) The problem is the OP used double hyphens, when LO requires a single hyphen, even for long options. $ libreoffice -headless -convert-to pdf foo.odt works fine. I've seen this described with one and two hyphens. Here, GNU/Linux, help text shows only one hyphen. But if I'm understanding the code (also see a message in the developers list about the change[1]), the idea is to move long options to --. The code (in the source tree) currently recognizes both ways (one dash and two dashes), and just warns the one-dash way is deprecated: ,[desktop/source/app/cmdlineargs.cxx, line 648] | if (bDeprecated) | /* ... */ | fprintf(stderr, Warning: %s is deprecated. Use -%s instead.\n, sArg.getStr(), sArg.getStr()); ` Also, here is the detection code (comments are mine, they're not in the code): ,[desktop/source/app/cmdlineargs.cxx, line 417] | bool bDeprecated = false; | | // If this is a long option (starts with two dashes) ... | if (aArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(--))) | { | // ... ignore the dashes. | oArg = ::rtl::OUString(aArg.getStr()+2, aArg.getLength()-2); | } | | // Long options starting with a single dash are deprecated | else if (aArg.toChar() == '-') | { | // For now, ignore the dash and accept the argument, but | // register the deprecated use (user will be warned later). | bDeprecated = true; | oArg = ::rtl::OUString(aArg.getStr()+1, aArg.getLength()-1); | } ` [I've not updated the source recently, so this is some days old. If there were changes to the file, line numbers may have changed.] Now I don't know if this is the code was used for the current builds. At least LibreOffice 3.3.3 here does not recognize two dashes for long options, and does not warn about single dash being deprecated. If it isn't used for lee's build, it explains the error -- Tom is right, I guess lee's LibO just ignored --convert-to and used pdf as a filename to open. Lee, try with only one dash. (Yes, I'd not expect only a single dash for long options, but it seems that this was, until recently, the way LibO/OOo did it.) [1] http://permalink.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/4529 -- Nuno J. Silva (aka njsg) gopher://sdf-eu.org/1/users/njsg -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Command line (convert) parameter(s)
On 06/22/2011 02:33 AM, Stephan Zietsman wrote: ... On a second point, soffice.exe -? is a little tricky. Instead of listing the available command parameters to the console, it opens up a Help Message... window (this is in Windows7 x64). Not all of the text fits into this window, and I can't scroll or resize the window. So in all fairness, it is possible that the -convert-to parameter is mentioned there, I just can't see it in the window. Does anyone know how I can get the help info to display properly? Not sure about Windows, but here is the output of the '--help' command in linux. I suspect that the same commands are also available in Windows. /opt/libreoffice3.4/program/soffice --help LibreOffice 3.4 340m1(Build:101) Usage: soffice [options] [documents...] Options: --minimizedkeep startup bitmap minimized. --invisibleno startup screen, no default document and no UI. --norestoresuppress restart/restore after fatal errors. --quickstart starts the quickstart service --nologo don't show startup screen. --nolockcheck don't check for remote instances using the installation --nodefaultdon't start with an empty document --headless like invisible but no userinteraction at all. --help/-h/-? show this message and exit. --version display the version information. --writer create new text document. --calc create new spreadsheet document. --draw create new drawing. --impress create new presentation. --base create new database. --math create new formula. --global create new global document. --web create new HTML document. -oopen documents regardless whether they are templates or not. -nalways open documents as new files (use as template). --display display Specify X-Display to use in Unix/X11 versions. -p documents... print the specified documents on the default printer. --pt printer documents... print the specified documents on the specified printer. --view documents... open the specified documents in viewer-(readonly-)mode. --show presentation open the specified presentation and start it immediately --accept=accept-string Specify an UNO connect-string to create an UNO acceptor through which other programs can connect to access the API --unaccept=accept-string Close an acceptor that was created with -accept=accept-string Use -unnaccept=all to close all open acceptors --infilter=filter Force an input filter type if possible Eg. -infilter=Calc Office Open XML --convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files Batch convert files. If -outdir is not specified then current working dir is used as output_dir. Eg. -convert-to pdf *.doc -convert-to pdf:writer_pdf_Export -outdir /home/user *.doc --print-to-file [-printer-name printer_name] [-outdir ouput_dir] files Batch print files to file. If -outdir is not specified then current working dir is used as output_dir. Eg. -print-to-file *.doc -print-to-file -printer-name nasty_lowres_printer -outdir /home/user *.doc Remaining arguments will be treated as filenames or URLs of documents to open. -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
Hi :) I think on Windows you can pipe commands although it's a bit different from gnulinux or bsd. I htink there is a way of piping output into a text-file but i don't know how. This might work tho soffice.exe -? | more The | is not an L or i, on a UK keyboard it's between the left shift and the Z. On american keyboards and laptops its around the Enter key but i keep forgetting where. I think Windows command-line now allows you to repeat old commands by pressing the keyboard's up-arrow. I think the kind linux person's version of that quick-help thing is probably the same as the Windows version. Regards from Tom :) From: NoOp gl...@sbcglobal.net To: users@global.libreoffice.org Sent: Fri, 24 June, 2011 22:31:20 Subject: [libreoffice-users] Re: Command line (convert) parameter(s) On 06/22/2011 02:33 AM, Stephan Zietsman wrote: ... On a second point, soffice.exe -? is a little tricky. Instead of listing the available command parameters to the console, it opens up a Help Message... window (this is in Windows7 x64). Not all of the text fits into this window, and I can't scroll or resize the window. So in all fairness, it is possible that the -convert-to parameter is mentioned there, I just can't see it in the window. Does anyone know how I can get the help info to display properly? Not sure about Windows, but here is the output of the '--help' command in linux. I suspect that the same commands are also available in Windows. /opt/libreoffice3.4/program/soffice --help LibreOffice 3.4 340m1(Build:101) Usage: soffice [options] [documents...] Options: --minimizedkeep startup bitmap minimized. --invisibleno startup screen, no default document and no UI. --norestoresuppress restart/restore after fatal errors. --quickstart starts the quickstart service --nologo don't show startup screen. --nolockcheck don't check for remote instances using the installation --nodefaultdon't start with an empty document --headless like invisible but no userinteraction at all. --help/-h/-? show this message and exit. --version display the version information. --writer create new text document. --calc create new spreadsheet document. --draw create new drawing. --impress create new presentation. --base create new database. --math create new formula. --global create new global document. --web create new HTML document. -oopen documents regardless whether they are templates or not. -nalways open documents as new files (use as template). --display display Specify X-Display to use in Unix/X11 versions. -p documents... print the specified documents on the default printer. --pt printer documents... print the specified documents on the specified printer. --view documents... open the specified documents in viewer-(readonly-)mode. --show presentation open the specified presentation and start it immediately --accept=accept-string Specify an UNO connect-string to create an UNO acceptor through which other programs can connect to access the API --unaccept=accept-string Close an acceptor that was created with -accept=accept-string Use -unnaccept=all to close all open acceptors --infilter=filter Force an input filter type if possible Eg. -infilter=Calc Office Open XML --convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files Batch convert files. If -outdir is not specified then current working dir is used as output_dir. Eg. -convert-to pdf *.doc -convert-to pdf:writer_pdf_Export -outdir /home/user *.doc --print-to-file [-printer-name printer_name] [-outdir ouput_dir] files Batch print files to file. If -outdir is not specified then current working dir is used as output_dir. Eg. -print-to-file *.doc -print-to-file -printer-name nasty_lowres_printer -outdir /home/user *.doc Remaining arguments will be treated as filenames or URLs of documents to open. -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Command line (convert) parameter(s)
NoOp gl...@sbcglobal.net writes: On 06/22/2011 02:33 AM, Stephan Zietsman wrote: --convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files Batch convert files. If -outdir is not specified then current working dir is used as output_dir. Eg. -convert-to pdf *.doc -convert-to pdf:writer_pdf_Export -outdir /home/user *.doc This doesn't work: , | lee@yun:~/tmp$ libreoffice --headless --convert-to pdf test.odt ` ... pops up a dialogue box saying /home/lee/tmp/pdf does not exist. Please note the --headless option; it's another bug that it pops up a dialogue box nonetheless. Please note that in the example, it's -convert-to. So what should it be, --convert-to or -convert-to? -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Command line (convert) parameter(s)
On 06/24/2011 07:03 PM, lee wrote: NoOp gl...@sbcglobal.net writes: On 06/22/2011 02:33 AM, Stephan Zietsman wrote: --convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files Batch convert files. If -outdir is not specified then current working dir is used as output_dir. Eg. -convert-to pdf *.doc -convert-to pdf:writer_pdf_Export -outdir /home/user *.doc This doesn't work: , | lee@yun:~/tmp$ libreoffice --headless --convert-to pdf test.odt ` ... pops up a dialogue box saying /home/lee/tmp/pdf does not exist. Please note the --headless option; it's another bug that it pops up a dialogue box nonetheless. Please note that in the example, it's -convert-to. So what should it be, --convert-to or -convert-to? Worked for me. I created a test.odf and then: $ /opt/libreoffice3.4/program/soffice --convert-to pdf test.odt and I now have: $ ls test.pdf test.pdf -- Unsubscribe instructions: E-mail to users+h...@global.libreoffice.org In case of problems unsubscribing, write to postmas...@documentfoundation.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted