Linux command line LibreOffice headless first page is blank (only white)

I use linux

the command libreoffice --headless --convert-to pdf "/path/to/document.txt"

usually, it’s all good, but certain documents gets the first page blank

here a sample of the original file
https://www.tubfeed.com/media/ownchunx/15205451584592/15216216689872/15216216689872.xsd

is there an option in the linux command line I can add to prevent this blank page ?

it starts like this

<?xml version="1.0" encoding="utf-8"?>
<!-- Mit XMLSpy v2015 sp2 (x64) (http://www.altova.com) von Thomas Liebich (AEC3 Deutschland GmbH) bearbeitet -->
<xs:schema xmlns:mvd="http://buildingsmart-tech.org/mvdXML/mvdXML1-1" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://buildingsmart-tech.org/mvdXML/mvdXML1-1" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.d strict">
	<xs:annotation>
		<xs:documenta

A naive question: why do you want to convert a .txt file to PDF? There is no formatting in a plain text file, therefore no risk of missing font, faulty page layout, etc.

By loading your text file into Writer, you implicitly create formatting and layout through the default template, at least with Default Paragraph Style and Default Page Style. The resulting PDF file is bigger than the .txt version. If your goal is to send the file in such a way it can’t be modified (and there are many workarounds to circumvent this for such a simple file), there are certainly better methods.

It’s not about formatting.

I’m building a web platform where users can have a multimedia library, I want a jpg preview of any kind of files they upload… I can convert more than 700+ file types using a combination of ffmpeg, cvlc, ImagMagick, xnconvert, gm, python, assimp, libreoffice, fontforge, etc…

In this web platform, I also add email management, so having a preview of attached files is just nicer…

It’s libreoffice (rarerly but it happens from time to time) that can generate the first page blank.

I just want a way to prevent the first blank page