Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created January 17, 2020 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/6b3fd2f622633cffc7e000b4d33bb027 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/6b3fd2f622633cffc7e000b4d33bb027 to your computer and use it in GitHub Desktop.
// Load source PDF file
Document doc = new Document("input.pdf");
// Save resultant DOC file
doc.save("output.doc", SaveFormat.Doc);
// Load source PDF file
Document doc = new Document("input.pdf");
// Instantiate DocSaveOptions instance
DocSaveOptions saveOptions = new DocSaveOptions();
// Set output format
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 bullets recognition during conversion process
saveOptions.setRecognizeBullets(true);
// Save resultant DOCX file
doc.save("resultant.docx", saveOptions);
// Load source PDF file
Document doc = new Document("input.pdf");
// Save resultant DOCX file
doc.save("output.docx", SaveFormat.DocX);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment