Hi there,
I’m using Aspose for Java (v24.2 for pdf and v24.3 for words) and I’m trying to convert pdf document to docx. Library does that job correctly, more or less, but as result I have Docx document and is somehow non-editable.
Is there a way to configure it to return editable document?
Below is part of my code related to conversion:
AsposeLicenseLoader.loadAllAvailableLicenses();
com.aspose.pdf.Document document = new com.aspose.pdf.Document(file.getInputStream());
if (checkIfPdfIsConvertible(document)) {
log.debug("Start converting document: {} ,from PDF to DOCX", file.getOriginalFilename());
com.aspose.pdf.DocSaveOptions saveOptions = new com.aspose.pdf.DocSaveOptions();
saveOptions.setFormat(DocSaveOptions.DocFormat.DocX);
// Set the recognition mode as Flow
// saveOptions.setMode(DocSaveOptions.RecognitionMode.Flow);
// Set the Horizontal proximity as 2.5
saveOptions.setRelativeHorizontalProximity(2.5f);
// Enable the value to recognize bullets during conversion process
saveOptions.setRecognizeBullets(true);
String fileName = getFilenameForWordDocument(file.getOriginalFilename());
File temp = new File(Objects.requireNonNull(fileName));
OutputStream outputStream = new FileOutputStream(temp);