Skip to content

JCodePeace/Lycorse-DPL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lycorse-DPL

Lycorse Document Processing Library - Java Library for Microsoft Office and LibreOffice documents processing.

The project is still in developing.

Getting Started

Basic replacement

To replace word in a document you can use the DocumentManager class:

File file = new File("Document.odt");
DocumentManager documentManager = DocumentManagerProvider.createDocumentManager(file);
Document document = documentManager.openDocument(file);
document.replace("{Search}", "Value");
document.saveDocumentAs(
        new File("C:/Document.docx"),
        DocumentConvertTypes.MS_WORD_2007_XML);

Advanced functionality

In order to use more functionality you can use the LibreOfficeUnoManager.

Replacement

File document = new File("Document.odt");
LibreOfficeUnoManager libreOfficeUnoManager = new LibreOfficeUnoManager();
libreOfficeUnoManager.openDocument(document);
libreOfficeUnoManager.replaceAll("${Search}", "Value");

About

Lycorse Document Processing Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages