@page media print

Using the HTML2PDF Module, I cannot print a PDF from an HTML with @page css tag.
Example of my HTML:

<?xml version="1.0" encoding="UTF-8"?> 1212a314-9d44-414f-b8b4-0c061d427cc7.rtf @page { size: a4; margin-top: 50.0pt; margin-bottom: 50.0pt; margin-left: 0.0pt; margin-right: 0.0pt; background: white; } ... a very long text...

I tried also to encapsulate @page inside a “@media print” class and setting WebPageSettings.SetPrintMediaType to true, but no success.
With the same css, the Chrome print to pdf prints a correct paginated PDF.
There is a way to make it work?

To investigate further could you please provide the following information.

  1. Input file(s) (HTML plus any other required external files)
  2. Generated output file(s) (PDF output)
  3. Code and settings used to generate (2) from (1)
  4. Screenshots showing the output, and clearly indicating what you expected to get instead, and also clearly indicating the application/browser being used to view.