Hi guys again, The above script and some others that I have found through the OpenOffice website are focused on extracting images. I do that through ODFDOM ( http://odftoolkit.org/) so that's not a problem for me.
I am now trying to export charts and single shapes as jpg images. I have read somewhere that Drawing documents and single shapes are exportable and in fact I did for Drawing pages but this give me a screen shot of the entire page and what I would like to have is simply the single object as a jpg image. So far I get charts and shapes via using TheComponent.getEmbeddedObjects and TheComponent.getDrawPage () respectively but it is here where my problems start for both of them: 1.- Charts: I have tried to create a chart in a drawing page and then export it as jpg file.That worked fine so I believe, from the Writer I can just open a drawing page and hide (I read somewhere, no sure where exactly) and then execute this macro and the problem is solved BUT I do just want the single object instead of the entire page as a 'screenshot'. 2.- Shapes: I am bit lost because all that I am able to find out as exporter ishttp:// api.openoffice.org/docs/common/ref/com/sun/star/document/XExporter.html and in there it looks like this is only available for documents themselves rather than for single objects (charts or shapes). Could anyone please give me a clue or hint to what part of the API or whatever I am missing which would help me to finish this? Thank you very much, Daniel. On Wed, Feb 18, 2009 at 3:59 PM, Daniel Garcia <[email protected]>wrote: > > At any rate I am absolutely delighted with both OpenOffice and > Odftoolkit.org. > > On Wed, Feb 18, 2009 at 3:51 PM, Daniel Garcia > <[email protected]>wrote: > >> >> Hi Christian, >> >> Thank you very much for those tips and explanations . The thing of >> running openoffice without x-windows is definitely a great news and I >> somehow knew that it had to be a way to address this issue. >> >> The fact that I am asking here is because I asked in odftoolkit.org's >> forum firstly and I was said: >> >> "the image format of the replacement files is not standardized format, >> where no other solution to transform these meta files exist as to use OOo at >> the moment. >> Nevertheless it would be nice to transform them in the future to JPEG. But >> it is not in the close future that we will work on this." >> >> The encouraged me to ask in here to find out another solution ( >> http://odftoolkit.org/projects/odftoolkit/forums/ODFDOM/topics/37-ODFtoolkit-question? >> ). >> >> Right now I will use a macro to zip out charts and drawings but I will >> absolutely be alert to odftoolkit can release. >> >> Thank you everyone again. >> >> Daniel. >> >> >> On Wed, Feb 18, 2009 at 3:34 PM, Christian Lippka - Sun Microsystems GmbH >> - Hamburg <[email protected]> wrote: >> >>> Just two small remarks.... >>> >>> OpenOffice.org runs without x-windows, search for "headless" mode. >>> >>> jpg/png do not scale well and until recently there just was no open >>> vector format so >>> OOo sticked with starview metafile which is an extension to the long >>> outdated windows >>> metafile. The replacement will be svg but this would still not solve your >>> problems as >>> Internet Explorer still does not support svg. >>> >>> You should monitor the odftoolkit.org project, maybe a java based >>> starview metafile >>> renderer will pop up there in the not so distant future... >>> >>> Regards, >>> Christian >>> >>> Daniel Garcia wrote: >>> >>>> Hi ingrid, >>>> >>>> The most difficult one yet :). I thought about that but the server is a >>>> debian installation with no x-windows. This computer will be serving web >>>> pages on live so I am scared of security wholes that a x-windows system >>>> might cause. >>>> >>>> Even so, the application would depend on so many third parties. What >>>> happens if the x-windows crashes? The server is not at the same place as >>>> the >>>> clients. >>>> >>>> Anyway, the more and more I am realizing that is not going to be >>>> possible >>>> to do that at the server side so I will likely need a macro able to be >>>> run >>>> in client's openoffice instance able to convert charts and drawing to >>>> jpg/png or whatever format that is treatable. >>>> >>>> What I do not understand is, Why OpenOffice do not supply those as >>>> jpg/png >>>> images since this process is already implemented because when you save >>>> the >>>> openoffice file as a html file, you can get those objects as png images. >>>> Instead, you get a startview metafile for charts and nothing for >>>> drawing... >>>> weird. It might be because of opendocument standard's premises. >>>> >>>> Thanks again, >>>> >>>> Daniel. >>>> >>>> On Wed, Feb 18, 2009 at 11:02 AM, Ingrid Halama <[email protected] >>>> >wrote: >>>> >>>> >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >> >
