Last active
November 22, 2023 13:34
Convert PDF to DOCX Using Java. For more information, please follow link: https://kb.groupdocs.com/conversion/java/convert-pdf-to-docx-using-java/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.groupdocs.conversion.Converter; | |
import com.groupdocs.conversion.filetypes.WordProcessingFileType; | |
import com.groupdocs.conversion.licensing.License; | |
import com.groupdocs.conversion.options.convert.WordProcessingConvertOptions; | |
public class ConvertPDFtoDOCXUsingJava { | |
public static void main(String[] args) { | |
// Set License to avoid the limitations of Conversion library | |
License license = new License(); | |
license.setLicense("GroupDocs.Conversion.lic"); | |
// Import PDF document | |
Converter converter = new Converter("input.pdf"); | |
WordProcessingConvertOptions options = new WordProcessingConvertOptions(); | |
options.setFormat(WordProcessingFileType.Docx); | |
// Save the DOCX to disk | |
converter.convert("result.docx", options); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment