Ask Your Question

Join several text boxes to create one.

asked 2018-06-05 19:51:33 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I always have that problem when I edit some pdf files with Draw, the text appears in separate books. Is there an easy way to join the text boxes?

I attach a document as an example.C:\fakepath\test.odt

edit retag flag offensive close merge delete


The example document is neither a PortablDocumentFile .pdf nor a 'Draw' document. It is saved in the ODF format for text files. Shapes behave differently in 'Writer' and in 'Draw'. I your case the two shapes are seemingly created as groups of textboxes which only can be entered or uingrouped in 'Draw'. It's a mess. In addition your texts contain some U+F0B7 PRIVATE USE CODEPOINT characters which have no glyph assigned.
See the "Edit1" to my answer below.

Lupp gravatar imageLupp ( 2018-06-07 22:19:51 +0200 )edit

It works well, Thanks !!, it's the first time I use marcos.

Hopefully someday this function comes to libreoffice, greetings! and thank you very much for the help!

Yona-TYT gravatar imageYona-TYT ( 2018-06-08 20:28:07 +0200 )edit

3 Answers

Sort by » oldest newest most voted

answered 2019-01-07 23:10:03 +0200

starryknight64 gravatar image

You might find my solution useful for this purpose:

edit flag offensive delete link more

answered 2018-06-06 15:36:12 +0200

Yona-TYT gravatar image

There is no built-in tool for joining texts contained in shapes. To get such a tool you would need to do some programming, and I suppose the handling of formats would be rather complicated.

It would be nice to have a tool like that. Is it possible to forward this as a request for a new function in libreoffice ??. it would be great. :)

edit flag offensive delete link more


I don't think the request would be accepted. You would have better chances, if you could describe it as technically as possible. The process for filing enhancement requests is the same as in just use "severity: enhancement".

Hynerian gravatar imageHynerian ( 2018-06-06 17:33:02 +0200 )edit

answered 2018-06-06 00:45:23 +0200

Lupp gravatar image

updated 2018-06-07 22:51:49 +0200

Draw isn't a suitable pdf editor. Copying shapes containing text from a Draw document to a Writer document makes things worse.

There is no built-in tool for joining texts contained in shapes. To get such a tool you would need to do some programming, and I suppose the handling of formats would be rather complicated. To transfer pieces of plain text from shapes in Draw to Writer with user code and to join them in a continuous text this way is not too difficult as long as the logical order (sequence of insertion) of the text-containing shapes is the order you want to get the text in.

I ported the contents of the sample document provided by the OQ to a 'Draw' file (.odg ) which is prepared to demonstrate the collection of texts from shapes. I wrote the code last february in pursuit of questions and suggestions posted in this thread of the well structured The code as it is can not work on a 'Writer' document. Given a collection of shapes currently selected in a 'Draw' document, it will go through it, resolve groups recursively, extract texts where texts are contained, sort these texts along the (1.) y- and the (2.) x- coordinates of the positions of the respective shapes, and unifies them into a single string with hard linebreaks between the parts. Text formats are disregarded.
If you are interested go to the third slide of this drawing, select all of its content, and run the Basic "macro" Standard.DoIt.walkThroughSortWrite contained in the file.
(The mentioned macro can easily be changed to output the result to a new text document by removing one apostrophe. The needed Writer-oriented code is contained.)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-06-05 19:51:33 +0200

Seen: 201 times

Last updated: Jan 07