I have found one solution to the problem: In the following file C:\Program Files\OpenOffice.org 2.2\share\registry\modules\org\openoffice\TypeDetection\GraphicFilter\fcfg_internalgraphics_filters.xcu
Comment out wmf_import related node. This way all documents that are imported will have wmf files dropped. So, this works. (Note you must restart open office after making that change) But, what i really want is not to disturb Open Office installation, but be able to pass a filter while loading the document, so that wmf files are ignored or not converted. Not able to figure out exactly what should be the name and value of the filter. I have tried giving filter name as: 'wmf_import' and value as 'false', but that does not work. Relevant code looks like: ..... PropertyValue wmfPropertyValue = null; wmfPropertyValue = new PropertyValue(); wmfPropertyValue.Name = "wmf_Import"; //IS THIS CORRECT? wmfPropertyValue.Value = "false"; // IS THIS CORRECT? // Loading the wanted document PropertyValue[] propertyValues = new PropertyValue[1]; propertyValues[0] = wmfPropertyValue; String sourceUrl = "file:///c:/somedir/SomeFile.doc"; // Load the document into the target frame by using his name and special search flags. component = componentLoader.loadComponentFromURL(sourceUrl, "odk_officedev_desk", FrameSearchFlag.CREATE, propertyValues); // THIS LINE HANGS... .... Jasper2000 wrote: > > While importing MS word documents which have wmf images(cliparts i think) > in them, if the wmf image is very big (say 2.5 MB), the import seems to > hang (i.e take very very long time to import). This maybe because Open > Office is trying to convert the wmf image to some other format like jpg > etc. > > Is it possible that i can pass some sort of filter to Open office, so that > it ignores all the wmf images (effectively drops them) Or doesnt convert > them to some other format; so that document import succeeds. > > loadComponentFromURL(...) is ofcourse used to import MS Word doc (java). > > Any help or pointers to resolve this issue is greatly appreciated. > -- View this message in context: http://www.nabble.com/Importing-MS-Word-Docs-with-big-wmf-images-%28probably-cliparts%29-tp20108132p20109759.html Sent from the openoffice - framework dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]