S
S
Sergey Berezovsky2018-02-09 04:37:23
Java
Sergey Berezovsky, 2018-02-09 04:37:23

How can I add text from Word or similar programs to a form in JavaFX?

How can you add text from Word or similar programs to the form, while making as little effort as possible, while maintaining their design style as in the file.
I have several options, but they are all a chore.
1) Immediately arrange in fxml-file.
2) To issue in html and then to throw on the form.
Each Word contains a lecture (there are relatively many pages). Is there an easier way?
5a7cfb126f067294366152.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Alexandrov, 2018-02-09
@SergeyBerezovsky

The easiest way would be to export the word document to html. on the form to display it through WebView. You don't even have to drag any dependencies.

E
Eugene, 2018-02-09
@zolt85

If the content is static, you can convert the documents to PDF, and cut pictures from them, and already display them. You can immediately display PDF. If the content is dynamic and needs to be converted to PDF on the fly, you can use OpenOffice (it needs to be on the client). These are the simplest ways to display documents in a Java application. If there is no need for a cross-platform program, and it is needed on Windows, I would take the .Net Framework and C # if I were you, there are definitely some for native display of MS Office documents under it.

U
uncleJasper, 2018-02-09
@uncleJasper

Use the library to parse the Word and change the contents of the field. For example, as with TextField ( https://o7planning.org/ru/11093/javafx-textfield-t...

TextField titleTextField;
    titleTextField = new TextField();
    titleTextField.setText("КАКОЙ_НИБУДЬ_ТЕКСТ");

Here is an example how to parse a .docx file ( https://www.codeproject.com/Articles/20529/Using-D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question