@souf123
The task will be closed in version 24.02
A new property HtmlLoadOptions.IsPriorityCssPageRule has been added.
You need to set it to true, then the @page rules defined in the css will override the values defined in PageInfo.
Сode example:
string inFile = "56373.html";
string outFile = "56373.pdf";
var options = new HtmlLoadOptions(url path of css files);
options.IsPriorityCssPageRule = true;
var pdfDocument = new Document(inFile, options);
pdfDocument.Save(outFile);