Hi Albert,

here in short the lines I used to export a picture from the current
document. This only exports the current page of the document - other
pages are ignored.

 dim exportArgs(1) as new com.sun.star.beans.PropertyValue
 exportArgs(0).Name = "MediaType"
 exportArgs(0).Value = "image/png"
 ThisComponent.storeToURL(<url of the file to export>, exportArgs)      

May be the list of arguments required to specify the correct output
filter is not complete. In my tests I noticed, that these lines of
code work, but only after exporting the document via file->export at
least once before.

regards, Christoph

2009/1/5 Albert Law <a...@snowbound.com>:
> Hi All,
> I've started to play around with the OO SDK.  I have a question...
> How do I load a document and then save it as an image?
> e.g. load a DOCX file and then save the cover page (er... first page) to a
> JPG file
> I figured out how to load a DOCX, but I haven't figured out the second bit.
> I tried to do it through the print methods, but that only allows for a PS
> output.
> Currently, I'm looking into XRenderable...  no luck yet.
> Any ideas?  Thanks!
> -
> Albert

To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to