Tim Parth wrote:
Hi!
Producing a preview works, but I couldn't receive an Image of the
rendered document either. My current approach is: exporting a document
to PDF
Interesting aproach, there is also a OO-project to open PDF as a
writerodc, maybe you will find there some usefull information to convert
PDF into a graphic format without using Goastscript
, rendering it to JPG through Ghostscript and loading it back into my
application. Not the best way but it works for the moment.
If anybody knows a better approach - don't hesitate telling me! Thank
you all in advance!
Kind regards,
Tim
--------------------------------------------------
From: "Marc Santhoff" <[EMAIL PROTECTED]>
Sent: Saturday, April 26, 2008 5:23 PM
To: <dev@api.openoffice.org>
Subject: Re: [api-dev] XRenderer.render
Am Samstag, den 26.04.2008, 10:41 +0200 schrieb Tim Parth:
Hi all!
Is it possible to use the interface XRender with it's method render
to render a complete TextDocument (swriter) into an image for
further use? The documentation is very short an I don't know exactly
if it suits my needs and if yes, how to use it.
Thank you all very much in advance!
Hi,
since noone seems to know the answer:
I remember darkly having fiddled with such stuff and a way I found was
using some "PrintPreview"-related properties and functions. IIRC these
functions dealt with rendering the preview of templates.
Maybe you'll find something looking for that keywords ...
HTH,
Marc
P.S.: found somthing ...
sub testLoadAsPreview
oDT = createUnoService("com.sun.star.frame.Desktop")
aURL = convertToUrl("/home/marc/Dokumente/Notizen.sdw")
dim Args(1) as new com.sun.star.beans.PropertyValue
Args(1).Name = "ReadOnly"
Args(1).Value = TRUE
Args(0).Name = "Preview"
Args(0).Value = TRUE
tmpDoc = oDT.loadComponentFromUrl(aURL, "_blank", 0, Args())
end sub
After that you would need to extract a bitmap out of the view.
Have fun ... ;)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]