I want to automatically create a .ps file from a html file using a script on this FC6 machine.
It seems to me that OpenOffice should fit this bill as it can load a html file and print to a PostScript file. However, doing this automatically from the commandline is becoming a challenge.
I thought I might be able to set up a printer using spadmin that would simply print to a file, then use a command like:
ooffice -pt textfileprinter document.html
Unfortunately, I have run into a roadblock here in that, on my installation of OpenOffice, when I run /usr/lib/openoffice.org2.0/program/spadmin and select "new printer" the options "Add a printer" (and "Import printers from a StarOffice intallation", though this one is not relevant) are greyed out and the only selections that I can make are "Connect a fax device" or "Connect a PDF converter".
So how can I add a printer to OpenOffice that will print to a Postscript file?
On Mon, 2007-02-12 at 16:11 -0600, Frank Cox wrote:
I want to automatically create a .ps file from a html file using a script on this FC6 machine.
It seems to me that OpenOffice should fit this bill as it can load a html file and print to a PostScript file. However, doing this automatically from the commandline is becoming a challenge.
I thought I might be able to set up a printer using spadmin that would simply print to a file, then use a command like:
ooffice -pt textfileprinter document.html
Unfortunately, I have run into a roadblock here in that, on my installation of OpenOffice, when I run /usr/lib/openoffice.org2.0/program/spadmin and select "new printer" the options "Add a printer" (and "Import printers from a StarOffice intallation", though this one is not relevant) are greyed out and the only selections that I can make are "Connect a fax device" or "Connect a PDF converter".
So how can I add a printer to OpenOffice that will print to a Postscript file?
I might have the syntax wrong - but I think it can be done in AbiWord via
abiword --print=foo.ps foo.html
abiword is in extras You might need a plugin in AbiWord to open html files, I don't know.
On Mon, 2007-02-12 at 14:58 -0800, Michael A Peters wrote:
I might have the syntax wrong - but I think it can be done in AbiWord via
abiword --print=foo.ps foo.html
abiword is in extras You might need a plugin in AbiWord to open html files, I don't know.
Seems the AbiWord html import plugin is broken at the moment - at least for my test case :( - otherwise it should work.
On Mon, 2007-02-12 at 15:06 -0800, Michael A Peters wrote:
On Mon, 2007-02-12 at 14:58 -0800, Michael A Peters wrote:
I might have the syntax wrong - but I think it can be done in AbiWord via
abiword --print=foo.ps foo.html
abiword is in extras You might need a plugin in AbiWord to open html files, I don't know.
Seems the AbiWord html import plugin is broken at the moment - at least for my test case :( - otherwise it should work.
It just seems to insist on w3c html. use HTML Tidy (in package tidy in extras - /usr/bin/tidy) to clean the html. Then abiword from the cli can print to html.
IE -
tidy foo.html > bar.html abiword --print=foo.ps bar.html
On Mon, 12 Feb 2007 14:58:29 -0800 Michael A Peters mpeters@mac.com wrote:
I might have the syntax wrong - but I think it can be done in AbiWord
I installed cups-pdf, thinking that it would get me where I'm going in one step.
However, when I use this commandline:
ooffice -pt Cups-PDF 1.htm
nothing appears to happen. When I load OpenOffice and open 1.htm, then print to the Cups-PDF printer, I get 1.pdf on my desktop like I expected.
ooffice -pt Cups-PDF test.sxw does what I expect and gives me test.pdf on my desktop.
Frank Cox wrote:
I want to automatically create a .ps file from a html file using a script on this FC6 machine.
html2ps
It seems to me that OpenOffice should fit this bill as it can load a html file and print to a PostScript file. However, doing this automatically from the commandline is becoming a challenge.
Like using a sledge hammer to drive a wire brad.
I thought I might be able to set up a printer using spadmin that would simply print to a file, then use a command like:
ooffice -pt textfileprinter document.html
Unfortunately, I have run into a roadblock here in that, on my installation of OpenOffice, when I run /usr/lib/openoffice.org2.0/program/spadmin and select "new printer" the options "Add a printer" (and "Import printers from a StarOffice intallation", though this one is not relevant) are greyed out and the only selections that I can make are "Connect a fax device" or "Connect a PDF converter".
So how can I add a printer to OpenOffice that will print to a Postscript file?