A bit OT, because the idea introduces a redirection via extra software, but as I see you are on Linux and you are bound on command line - the following works for me (Create a PDF using libreoffice and convert the resulting PDF to png files)
ibreoffice6.2 --convert-to pdf Test.odt && convert -density 288x288 -units pixelsperinch Test.pdf -background white -alpha background -alpha off -quality 100 -resize 25% Test.png
The tool convert
is part of ImageMagick and thus available on Ubuntu. Though there is only 1 Test.png in the command line, convert
will create a Test-<#>.png for each page of the pdf.
Please consider the command just as an outline of how it works. If you decide to go this way, I want you direct to the importance of file policy.xml
in /etc/ImageMagick-<whatever>/
directory, which determines the permissions on various actions to be performed by ImageMagick tools.