|
1 | 1 | # Java-Word-Find-and-Replace-Examples
|
2 |
| -Find and replace text in a Word document in Java without Microsoft Word or interop. |
| 2 | + |
| 3 | +This repository contains examples that illustrates how to find and replace text in Word documents programmatically in Java using [Syncfusion’s Java Word library](https://www.syncfusion.com/word-framework/java/word-library?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples) (Essential DocIO) without Microsoft Word or Office interop dependencies. |
| 4 | + |
| 5 | +## Find and replace text in Word documents using Java |
| 6 | + |
| 7 | +The Syncfusion Java Word library (Essential DocIO) provides comprehensive APIs to find and replace text in a Word document with any desired text, image, hyperlink, paragraph, table, and part of a document or an entire document. It provides options to find text by matching case and whole words. You can find each occurrence one by one or all the occurrences of a text in the document. It saves your efforts and time by helping you to automate find and replace a pattern of text in a Word document using [Regex](https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex). It allows you to save the resultant document as Word document (DOCX, WordML), HTML, RTF. |
| 8 | + |
| 9 | +## Jar files |
| 10 | + |
| 11 | +You can download the jars from the Syncfusion [maven repository](https://jars.syncfusion.com/?_ga=2.177721445.1332356717.1617771042-23317178.1569844681) to use our artifacts in your projects. It helps you to use the Syncfusion Java packages without installing Essential Studio or platform installation to development with Syncfusion controls. |
| 12 | + |
| 13 | +## Key Features |
| 14 | + |
| 15 | +- [Find and highlight text in Java](findandhighlighttext/) - Find text from a Word document and format or highlight it. |
| 16 | + |
| 17 | +- [Find and replace text in Java](findandreplacetext/) - Find text from a Word document and replace it with another text. |
| 18 | + |
| 19 | +- [Replace text with image in Java](replacetextwithimage/) - Find a placeholder text from a Word document and replace it with any desired image. |
| 20 | + |
| 21 | +- [Replace text with merge field in Java](replacetextwithmergefield/) - Find a pattern of text from a Word document and replace it with merge fields. |
| 22 | + |
| 23 | +- [Replace text with table in Java](replacetextwithtable/) - Find a placeholder text from a Word document and replace it with a table. |
| 24 | + |
| 25 | +- [Replace text with document in Java](replacetextwithdocument/) - Find text from a Word document and replace it with another Word document. |
| 26 | + |
| 27 | +- [Find and replace several paragraphs in Java](findandreplaceseveralparagraphs/) - Find text that extends to several paragraphs in a Word document and replace it with another Word document. |
| 28 | + |
| 29 | +## Screenshots |
| 30 | + |
| 31 | +**Find and highlight text** |
| 32 | + |
| 33 | +<p align="center"> |
| 34 | +<img src="screenshots/Find-and-highlight-text.png" alt="Find text from a Word document and format or highlight it in Java"/> |
| 35 | +</p> |
| 36 | + |
| 37 | +**Find and replace text** |
| 38 | + |
| 39 | +<p align="center"> |
| 40 | +<img src="screenshots/Replace-misspelt-word.png" alt="Find a misspelt word from a Word document and replace it with desired word in Java"/> |
| 41 | +</p> |
| 42 | + |
| 43 | +**Replace text with table** |
| 44 | + |
| 45 | +<p align="center"> |
| 46 | +<img src="screenshots/Replace-text-with-table.png" alt="Find text from a Word document and replace it with a table in Java"/> |
| 47 | +</p> |
| 48 | + |
| 49 | +# Resources |
| 50 | + |
| 51 | +- **Product page:** [Syncfusion Java Word Framework](https://www.syncfusion.com/word-framework/java?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples) |
| 52 | + |
| 53 | +- **Documentation:** [Find and Replace using Syncfusion Java Word library](https://help.syncfusion.com/java-file-formats/word-library/working-with-find-and-replace) |
| 54 | + |
| 55 | +- **Online demo:** [Essential DocIO demos](https://github.com/syncfusion/java-demos?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples) |
| 56 | + |
| 57 | +- **Download:** [Syncfusion File Formats Controls](https://www.syncfusion.com/sales/products/fileformats?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples) |
| 58 | + |
| 59 | +# Support and feedback |
| 60 | + |
| 61 | +* For queries, contact our [Syncfusion support team](https://www.syncfusion.com/support/directtrac/incidents/newincident?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples) or post the queries through [community forums](https://www.syncfusion.com/forums?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples). |
| 62 | + |
| 63 | +* To renew the subscription, click [here](https://www.syncfusion.com/sales/products?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples) or contact our sales team at [salessupport@syncfusion.com](mailto:salessupport@syncfusion.com). |
| 64 | + |
| 65 | +# License |
| 66 | + |
| 67 | +This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of [Syncfusion's EULA](https://www.syncfusion.com/eula/es?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples). You can purchase a license [here](https://www.syncfusion.com/sales/products?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples) or start a free 30-day trial [here](https://www.syncfusion.com/account/manage-trials/start-trials?utm_source=github&utm_medium=listing&utm_campaign=java-create-word-examples). |
| 68 | + |
0 commit comments