FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-17-2011, 11:47 PM
"Gregory P. Ennis"
 
Default openoffice & command line printing

Everyone,

I am trying to print some *.doc files from the command line with
openoffice on centos 5.5 with using cups as the print server.

I can open the file from the command line with open office and then
print it manually from the gui, but when I open the file and print from
command line I am not getting anything.

The commands that I have used are the following :

/usr/bin/openoffice.org -pt lpt4 /mnt/lp/document.doc
-terminate_after_init

/usr/bin/openoffice.org -pt lpt4 -p /mnt/lp/document.doc
-terminate_after_init

/usr/bin/openoffice.org -headless -pt lpt4 -p /mnt/lp/document.doc
-terminate_after_init

/usr/bin/openoffice.org -headless -pt lpt4 -p /mnt/lp/document.doc
-terminate_after_init

In each of these cases the command line finishes back to the "#" prompt,
but nothing prints on lpt4. Has anyone tried to use the command line
options for openoffice and have the syntax as to how it works.

Thanks much for any assistance you can give me.

--
Greg Ennis
PoMec Corporation
www.PoMec.net


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-18-2011, 12:29 AM
"Gregory P. Ennis"
 
Default openoffice & command line printing

Everyone,

I am trying to print some *.doc files from the command line with
openoffice on centos 5.5 with using cups as the print server.

I can open the file from the command line with open office and then
print it manually from the gui, but when I open the file and print from
command line I am not getting anything.

The commands that I have used are the following :

/usr/bin/openoffice.org -pt lpt4 /mnt/lp/document.doc
-terminate_after_init

/usr/bin/openoffice.org -pt lpt4 -p /mnt/lp/document.doc
-terminate_after_init

/usr/bin/openoffice.org -headless -pt lpt4 -p /mnt/lp/document.doc
-terminate_after_init

/usr/bin/openoffice.org -headless -pt lpt4 -p /mnt/lp/document.doc
-terminate_after_init

In each of these cases the command line finishes back to the "#" prompt,
but nothing prints on lpt4. Has anyone tried to use the command line
options for openoffice and have the syntax as to how it works.

Thanks much for any assistance you can give me.

----------------------------------------------------------

Here are some additional attempts

I tried to create a macro and use it from the command line as well.


openoffice.org -invisible /mnt/lp/document.doc "macro:///Standard.Module1.print_lpt4"

The above command starts openoffice in the gui; this command
automatically prints the document to lpt4 and openoffice remains open
until it is closed by the user.

openoffice.org -invisible /mnt/lp/john_deere_exam.doc
"macro:///Standard.Module1.print_lpt4" -terminate_after_init

The above command executes but nothing happens on the printer and the
command line prompt is returned.

It looks to me like openoffice is not opening up document.doc when the
command line is used. Is there a way to activate a debug switch to see
what is happening?

Greg


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-18-2011, 12:52 AM
Scott Robbins
 
Default openoffice & command line printing

On Thu, Feb 17, 2011 at 07:29:58PM -0600, Gregory P. Ennis wrote:
> Everyone,
>
> I am trying to print some *.doc files from the command line with
> openoffice on centos 5.5 with using cups as the print server.
>
> I can open the file from the command line with open office and then
> print it manually from the gui, but when I open the file and print from
> command line I am not getting anything.

I always used openoffice.org -p whatever.

--
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

Harmony: Why have you come to our lonely, small town, which
has no post office and very few exports?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-18-2011, 01:05 AM
"Gregory P. Ennis"
 
Default openoffice & command line printing

On Thu, Feb 17, 2011 at 07:29:58PM -0600, Gregory P. Ennis wrote:
> Everyone,
>
> I am trying to print some *.doc files from the command line with
> openoffice on centos 5.5 with using cups as the print server.
>
> I can open the file from the command line with open office and then
> print it manually from the gui, but when I open the file and print from
> command line I am not getting anything.

I always used openoffice.org -p whatever.
----------------------------------------------------

Scott,

Thanks for your suggestion. My understanding of the '-p' switch is that
it prints the document opened to the default printer which works for me
unless I add -terminate_after_init to the command line. With this
addition I am not getting anything, and without -terminate_after_init I
do not get an exit from openoffice.org

Any other ideas?

Greg

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-18-2011, 04:00 AM
Cameron Kerr
 
Default openoffice & command line printing

On 18/02/2011, at 2:29 PM, Gregory P. Ennis wrote:

> Everyone,
>
> I am trying to print some *.doc files from the command line with
> openoffice on centos 5.5 with using cups as the print server.
>
> I can open the file from the command line with open office and then
> print it manually from the gui, but when I open the file and print from
> command line I am not getting anything.
>
> The commands that I have used are the following :
>
> /usr/bin/openoffice.org -pt lpt4 /mnt/lp/document.doc
> -terminate_after_init

This works for me on LibreOffice on my Mac (also uses Cups)

LibreOffice 3.3 330m12(Build:1)

/path/to/soffice -headless -pt PRINTER_NAME doco.doc

Note though that if you wanted to do this outside of X11, it might fail...

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-18-2011, 01:30 PM
"Gregory P. Ennis"
 
Default openoffice & command line printing

On 18/02/2011, at 2:29 PM, Gregory P. Ennis wrote:

> Everyone,
>
> I am trying to print some *.doc files from the command line with
> openoffice on centos 5.5 with using cups as the print server.
>
> I can open the file from the command line with open office and then
> print it manually from the gui, but when I open the file and print from
> command line I am not getting anything.
>
> The commands that I have used are the following :
>
> /usr/bin/openoffice.org -pt lpt4 /mnt/lp/document.doc
> -terminate_after_init

This works for me on LibreOffice on my Mac (also uses Cups)

LibreOffice 3.3 330m12(Build:1)

/path/to/soffice -headless -pt PRINTER_NAME doco.doc

Note though that if you wanted to do this outside of X11, it might fail...

--------------------------------------------------------------------------

Cameron,

Thanks for your suggestion!!!!

On my system that command results in printing the document on the
desired printer, but does not return back to the shell prompt. If I add
-terminate_after_init so that the command line is :

openoffice.org -headless -pt lpt3 document.doc -terminate_after_init

The above command returns back to the prompt but the document is not
printed.

Any other ideas would be appreciated!!!

Greg

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-18-2011, 05:56 PM
Bill Campbell
 
Default openoffice & command line printing

On Fri, Feb 18, 2011, Gregory P. Ennis wrote:
>
>On 18/02/2011, at 2:29 PM, Gregory P. Ennis wrote:
>
>> Everyone,
>>
>> I am trying to print some *.doc files from the command line with
>> openoffice on centos 5.5 with using cups as the print server.
>>
>> I can open the file from the command line with open office and then
>> print it manually from the gui, but when I open the file and print from
>> command line I am not getting anything.
>>
>> The commands that I have used are the following :
>>
>> /usr/bin/openoffice.org -pt lpt4 /mnt/lp/document.doc
>> -terminate_after_init
>
>This works for me on LibreOffice on my Mac (also uses Cups)
>
>LibreOffice 3.3 330m12(Build:1)
>
>/path/to/soffice -headless -pt PRINTER_NAME doco.doc
>
>Note though that if you wanted to do this outside of X11, it might fail...

I tried this using NeoOffice on my Macbook Pro which doesn't use
X11, but I expect that it would fail on Linux without X11 as it
presents the normal print dialog box to select the printer even
though it's set on the command line.

Answering the question below, I ran this in background,
terminating the command with "&", which left NeoOffice running,
but gave me the command line back so I could continue. This is
not entirely a Bad Thing(tm) as it avoids the startup time when
printing multiple documents.

On the other hand, having NeoOffice present the print dialog box
for every file is less than optimal, but it looks like that's a
NeoOffice thing.

I tried the same command with the path to the most recent
OpenOffice.org soffice which didn't present the dialog box, and
terminated after the print job was complete.

Trying this on a CentOS 5 box here it works fine running the job
in background where it is ready to run subsequent print jobs.
This does not present the print dialog box either. I ran this
test in an xterm via ssh with X11 forwarding from my Macbook Pro.

Another test using 'xterm -e ssh -x' to disable X11 forwarding
failed on startup saying it can't open DISPLAY. Running the
command with 'ssh -Y user@system /path/to/soffice ...' did work
nicely, and did not leave soffice running on completion.

>--------------------------------------------------------------------------
>
>Cameron,
>
>Thanks for your suggestion!!!!
>
>On my system that command results in printing the document on the
>desired printer, but does not return back to the shell prompt. If I add
>-terminate_after_init so that the command line is :
>
>openoffice.org -headless -pt lpt3 document.doc -terminate_after_init
>
>The above command returns back to the prompt but the document is not
>printed.
>
>Any other ideas would be appreciated!!!
>
>Greg
>
>_______________________________________________
>CentOS mailing list
>CentOS@centos.org
>http://lists.centos.org/mailman/listinfo/centos
>

--
Bill
--
INTERNET: bill@celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792

UNIX was not designed to stop you from doing stupid things, because that
would also stop you from doing clever things. -- Doug Gwyn
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-19-2011, 12:02 AM
Cameron Kerr
 
Default openoffice & command line printing

On 19/02/2011, at 3:30 AM, Gregory P. Ennis wrote:

> Cameron,
>
> Thanks for your suggestion!!!!
>
> On my system that command results in printing the document on the
> desired printer, but does not return back to the shell prompt. If I add
> -terminate_after_init so that the command line is :
>
> openoffice.org -headless -pt lpt3 document.doc -terminate_after_init
>
> The above command returns back to the prompt but the document is not
> printed.

Ah, so it does... looking around, I see that it works as documented in versions of OOo before 3.1 (3.0.1 should work, and prior). You're certainly not alone.

I wonder if this will be useful for you:

http://www.oooninja.com/2008/02/batch-command-line-file-conversion-with.html

For further help, you ought to get better help on the OOo forums etc.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-19-2011, 03:54 AM
"Gregory P. Ennis"
 
Default openoffice & command line printing

On Fri, Feb 18, 2011, Gregory P. Ennis wrote:
>
>On 18/02/2011, at 2:29 PM, Gregory P. Ennis wrote:
>
>> Everyone,
>>
>> I am trying to print some *.doc files from the command line with
>> openoffice on centos 5.5 with using cups as the print server.
>>
>> I can open the file from the command line with open office and then
>> print it manually from the gui, but when I open the file and print from
>> command line I am not getting anything.
>>
>> The commands that I have used are the following :
>>
>> /usr/bin/openoffice.org -pt lpt4 /mnt/lp/document.doc
>> -terminate_after_init
>
>This works for me on LibreOffice on my Mac (also uses Cups)
>
>LibreOffice 3.3 330m12(Build:1)
>
>/path/to/soffice -headless -pt PRINTER_NAME doco.doc
>
>Note though that if you wanted to do this outside of X11, it might fail...

I tried this using NeoOffice on my Macbook Pro which doesn't use
X11, but I expect that it would fail on Linux without X11 as it
presents the normal print dialog box to select the printer even
though it's set on the command line.

Answering the question below, I ran this in background,
terminating the command with "&", which left NeoOffice running,
but gave me the command line back so I could continue. This is
not entirely a Bad Thing(tm) as it avoids the startup time when
printing multiple documents.

On the other hand, having NeoOffice present the print dialog box
for every file is less than optimal, but it looks like that's a
NeoOffice thing.

I tried the same command with the path to the most recent
OpenOffice.org soffice which didn't present the dialog box, and
terminated after the print job was complete.

Trying this on a CentOS 5 box here it works fine running the job
in background where it is ready to run subsequent print jobs.
This does not present the print dialog box either. I ran this
test in an xterm via ssh with X11 forwarding from my Macbook Pro.

Another test using 'xterm -e ssh -x' to disable X11 forwarding
failed on startup saying it can't open DISPLAY. Running the
command with 'ssh -Y user@system /path/to/soffice ...' did work
nicely, and did not leave soffice running on completion.

>--------------------------------------------------------------------------
>
>Cameron,
>
>Thanks for your suggestion!!!!
>
>On my system that command results in printing the document on the
>desired printer, but does not return back to the shell prompt. If I add
>-terminate_after_init so that the command line is :
>
>openoffice.org -headless -pt lpt3 document.doc -terminate_after_init
>
>The above command returns back to the prompt but the document is not
>printed.
>
>Any other ideas would be appreciated!!!
>
>Greg
>
>_______________________________________________

--
Bill
------------------------------------------------------------

Bill,

Thanks for taking the time to confirm my findings and giving me that
link .... lots of good information. I had hoped this was a simple
problem and my syntax was faulty, but am in agreement with you about
taking this to oo forums. I did make some progress with the use of
macros from the command line to print a file, but X11 is required, and
so far I have not been able to have it function from a background
script.

Thanks again Bill,

Greg

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-19-2011, 06:41 PM
"Gregory P. Ennis"
 
Default openoffice & command line printing

On Fri, Feb 18, 2011, Gregory P. Ennis wrote:
>
>On 18/02/2011, at 2:29 PM, Gregory P. Ennis wrote:
>
>> Everyone,
>>
>> I am trying to print some *.doc files from the command line with
>> openoffice on centos 5.5 with using cups as the print server.
>>
>> I can open the file from the command line with open office and then
>> print it manually from the gui, but when I open the file and print from
>> command line I am not getting anything.
>>
>> The commands that I have used are the following :
>>
>> /usr/bin/openoffice.org -pt lpt4 /mnt/lp/document.doc
>> -terminate_after_init
>
>This works for me on LibreOffice on my Mac (also uses Cups)
>
>LibreOffice 3.3 330m12(Build:1)
>
>/path/to/soffice -headless -pt PRINTER_NAME doco.doc
>
>Note though that if you wanted to do this outside of X11, it might fail...

I tried this using NeoOffice on my Macbook Pro which doesn't use
X11, but I expect that it would fail on Linux without X11 as it
presents the normal print dialog box to select the printer even
though it's set on the command line.

Answering the question below, I ran this in background,
terminating the command with "&", which left NeoOffice running,
but gave me the command line back so I could continue. This is
not entirely a Bad Thing(tm) as it avoids the startup time when
printing multiple documents.

On the other hand, having NeoOffice present the print dialog box
for every file is less than optimal, but it looks like that's a
NeoOffice thing.

I tried the same command with the path to the most recent
OpenOffice.org soffice which didn't present the dialog box, and
terminated after the print job was complete.

Trying this on a CentOS 5 box here it works fine running the job
in background where it is ready to run subsequent print jobs.
This does not present the print dialog box either. I ran this
test in an xterm via ssh with X11 forwarding from my Macbook Pro.

Another test using 'xterm -e ssh -x' to disable X11 forwarding
failed on startup saying it can't open DISPLAY. Running the
command with 'ssh -Y user@system /path/to/soffice ...' did work
nicely, and did not leave soffice running on completion.

>--------------------------------------------------------------------------
>
>Cameron,
>
>Thanks for your suggestion!!!!
>
>On my system that command results in printing the document on the
>desired printer, but does not return back to the shell prompt. If I add
>-terminate_after_init so that the command line is :
>
>openoffice.org -headless -pt lpt3 document.doc -terminate_after_init
>
>The above command returns back to the prompt but the document is not
>printed.
>
>Any other ideas would be appreciated!!!
>
>Greg
>
>_______________________________________________

Some Additional Information :

On Fedora14 with OpenOffice 3.3.0 I was able to execute the following
successfully :

openoffice.org -pt lpt4 document.doc

Looks like there are some Bugs in OpenOffice 3.1.1

Is there a way to request that CentOS maintainers or rpmforge to upgrade
the rpm to 3.3.0? The OpenOffice Forums are down today, apparently they
are moving to a different server.

Thanks to everyone for their assistance!!!!

Greg


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org