CTRL+A inside a table doesn't work correctly once the Writer document is converted to PDF

Hello everyone.

I have a document including both texts and lots of single celle tables (1 row and 1 column in each table) including programming source codes. While the document is open in LibreOffice Writer, if I put the cursor inside a table and do a CTRL + A, only the program code inside the table is selected, which is the desired behaviour so that I might be able to copy/paste the code easily elsewhere and run it.

However, I noticed that if the very document is exported as PDF, then doing a CTRL+A inside a table, doesn’t only select the content inside the table but also everything outside of the table even the page number at the bottom of the page. Of course this is absolutely not what I want to do. As a result I would like to ask:

  • Is this the normal behaviour expected when a document produced by LibreOffice Writer is exported as PDF ?

  • Is there any way to have the identical behaviour in PDF version so that a CTRL+A followed by a CTRL+ C done while the cursor focus is inside a table, only selects and copies the content of the table and nothing else outside?

Thanks in advance.

Exporting to PDF strips off all formatting directives. Think of PDF as a snapshot, a photo taken on every page. Your document is turned into a kind of image (it is more subtle but the effect is the same). PDF is a page description language. Note the terms “page description”. It doesn’t say document, text or something similar.

In other words, when you export to PDF, you lose any structure initially present. Consequently, don’t expect Ctrl+A to behave the same as in Word. A PDF reader (the program you use to display a PDF file) is an application different from LO. It is free to interpret keyboard commands in any way it likes; it is not committed to follow the same tracks as LO. This means Ctrl+A may have a different range.

As already mentioned, all structuring has been wiped out to keep only graphical elements (strokes, character glyphs, pictures) positioned on a page. There is no way to even know that something was set inside a table, or any other “container”.



Why do you use single cell tables? You stress Writer and this may degrade performance and make your document unstable.

The correct Writer way is to use a dedicated paragraph style, like built-in Preformatted Text, you customise to your needs to make it look as you want it.

PS: when asking here, always mention OS name, LO version and save format.

1 Like

Thank you very much for clarifying this. Therefore, sadly there is no solution with PDF.