Re: abiword --help

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Fri Mar 23 2007 - 20:08:32 CET

> I think that abiword --to-png or --thumb does not work from command line
> because it need a DISPLAY device. When I set Xvfb as a default display
> device, abiword --to-png started behaving differently, instead of giving
> some error it now just hangs.
>
> I wonder if anyone was able to create document preview pngs with abiword
> on a server that does not have a display?

--to-png is no longer supported in AbiWord 2.5. It never did what
people thought it would anyway. It would convert any image format to
PNG on the command-line. It would not convert a document to a PNG.
Basically, it was a *really really* dumb version of ImageMagick's
convert program.

In AbiWord 2.5, you don't need a display to convert a document to PS
or PDF (or any other format). From there, you can use ghostscript,
ImageMagick, or poppler to produce a preview image of the document.
I'd suggest writing a small program using Poppler's C API that does
exactly that. It would:

1) Use AbiWord to convert the document to PDF
2) Use poppler + a cairo image surface to load and render the first
page of that PDF
3) Save that cairo image surface to a PNG on disk

Should be < 50 lines of C code.

Best,
Dom

-- 
Counting bodies like sheep to the rhythm of the war drums.
-----------------------------------------------
To unsubscribe from this list, send a message to
abiword-user-request@abisource.com with the word
unsubscribe in the message body.
Received on Fri Mar 23 20:07:32 2007

This archive was generated by hypermail 2.1.8 : Fri Mar 23 2007 - 20:07:32 CET