You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "m.harig" <m....@gmail.com> on 2009/06/11 07:41:21 UTC

word file parsing content limit

hello all

             Am parsing a doc file using jakarta poi api . Its working fine
. When i tried to parse a 20MB file it throws "java heap space" exception .
How do i handle this exception without resizing my doc file ? Is there any
way to extract only a limit of content from my doc file. i.e )  if my doc
file size is 20MB , but i want to get the content of only 8MB . Is there any
way to solve this . Please any1 help me....
-- 
View this message in context: http://www.nabble.com/word-file-parsing-content-limit-tp23975592p23975592.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: word file parsing content limit

Posted by MSB <ma...@tiscali.co.uk>.
I could well be wrong but as I understand it, owing to the way the OLE2CDF
file format works, it is not possible to parse just a section of the file.
The first step I would recommend is to increase the amount of memory that
Java can use with these runtime options;

java -Xms<initial heap size> -Xmx<maximum heap size>

The default maximum is - I think - 128MB.

Yours

Mark B


m.harig wrote:
> 
> hello all
> 
>              Am parsing a doc file using jakarta poi api . Its working
> fine . When i tried to parse a 20MB file it throws "java heap space"
> exception . How do i handle this exception without resizing my doc file ?
> Is there any way to extract only a limit of content from my doc file. i.e
> )  if my doc file size is 20MB , but i want to get the content of only 8MB
> . Is there any way to solve this . Please any1 help me....
> 

-- 
View this message in context: http://www.nabble.com/word-file-parsing-content-limit-tp23975592p23976321.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org