问题
If I load a Word document into a JTextPane
, is there a way I could drop a custom shape in it, then save it as a new Word document?
The results I'm looking for are just like dropping a shape anywhere onto the document using Insert-> Shapes in MS Word.
回答1:
docx4all is a Swing-based docx editor.
Like DocxEditorKit, it is built on top of docx4j.
You'd need to extend it to support the functionality you are describing.
回答2:
You can try to extend the DocxEditorKit http://java-sl.com/docx_editor_kit.html adding your feature there
来源:https://stackoverflow.com/questions/15611562/adding-custom-shapes-to-jtextpane-and-saved-to-new-word-document