Bug 64860 - Split large document multiple small document
Summary: Split large document multiple small document
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-29 12:29 UTC by Dilipkumar
Modified: 2020-10-29 14:22 UTC (History)
0 users



Attachments
WHile converting large docx file into sfdt format throwing error (17.36 KB, image/png)
2020-10-29 12:29 UTC, Dilipkumar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dilipkumar 2020-10-29 12:29:11 UTC
Created attachment 37539 [details]
WHile converting large docx  file into sfdt format throwing error

HI I am converting docx into sfdt fromat it is worked for fine with 150 document having 200 pages if documents  large file which contains 2500 pages (8 mb) file means it giving error out of memory error.Can any one help how to resolve this error or suggest me solution to split large document into  multiple small documents.I have attached error also kindly check and make quick response on that.

this is the exact code i am using.

@PostMapping("/wordeditor/Import")
	public String uploadFile(@RequestParam("files") MultipartFile file) throws Exception {
		try {
			return WordProcessorHelper.load(file.getInputStream(), FormatType.Docx);
		} catch (Exception e) {
			e.printStackTrace();
			return "{\"sections\":[{\"blocks\":[{\"inlines\":[{\"text\":" + e.getMessage() + "}]}]}]}";
		}
	}
Comment 1 PJ Fanning 2020-10-29 12:33:47 UTC
Apologies Dilip - this is a bug tracker and this is not a bug.

I would suggest you use stackoverflow or possibly the POI user email list.
Comment 2 PJ Fanning 2020-10-29 14:20:33 UTC
Have you tried increasing the heap size on your JVM? (-Xmx)
Comment 3 PJ Fanning 2020-10-29 14:22:40 UTC
Maybe also worth reading articles like https://stackoverflow.com/questions/45740269/parsing-large-docx-file-in-java