Is there a size limitation to convert PDF to Word?

Hi,

We have licensed version of java aspose-pdf (v19.12) which we use to convert PDF to word. It is working fine for smaller pdfs. We have a usecase to convert PDF of size 30mb to word, but it is emitting StackOverflow error.

		InputStream myInputStream = new ByteArrayInputStream(inputPDFData);	
		Document document = new Document(myInputStream);
		DocSaveOptions saveOption = new DocSaveOptions();
		saveOption.setMode(DocSaveOptions.RecognitionMode.Textbox);	
		saveOption.setRelativeHorizontalProximity(2.5f);		
		saveOption.setRecognizeBullets(true);
		saveOption.setFormat(DocSaveOptions.DocFormat.DocX);
		ByteArrayOutputStream  docxOutputStream = new ByteArrayOutputStream ();
		try {
			document.save(docxOutputStream, saveOption);
		} catch (Exception e) {
			e.printStackTrace();
		}
		byte[] byteFile =  new RibbonCreator().create(docxOutputStream.toByteArray());
		if (debug == true && targetWrite != null) {
			FileUtils.writeByteArrayToFile(new File(Output.docx"), byteFile);
		}
		myInputStream.close();
		document.close();
		docxOutputStream.close();

@manojp1988

First of all, please make sure that you are using the latest version of the API as support is provided on the basis of the latest version. Then you can please try increasing the Java Heap Size in your system. In case issue still persists, please share your sample PDF with us so that we can test the scenario in our environment and address it accordingly.

With v23.2, we are able to produce docx file, but only 4 pages got converted to docx. Is this because, we are using trial version? or there is a problem to convert the rest of the pages from PDF to docx.

@manojp1988

It is converting only 4 pages because you are using it without a valid license. Please use a 30-days free temporary license to test with the latest version of the API i.e. 23.3 and let us know in case you still notice any issues.