Is it possible to fake a selection by code in headless mode?

Hi,

What I want to do is just rendering a table to image(png). My idea is to fake a selection just include the rect of the table and then render it to image which is similar to DocumentToGraphicRenderer::renderToGraphic.

Another idea is use GraphicFilter, but I don’t know which object of table (SwTableNode ?SwTabFrame or others) can cast to Reference < lang::XComponent > object.

Your comments are very appicated. Thanks.

Should your question be “How to export a TextTable to a .png image?”

The term “fake a selection” isn’t well known.
What is meant by

You may also tell for what reason(s) you need to get the table “rendered”.

Do you know this problem?

Or is this a question for SourceCode specialists only?

1 Like

Yes,What I want to do is only export table or latex to png without other elements. I’m doing something like extracting a table or latex/formula from docx.

BTW, Thanks your advance for the XY question.