PDF creating from a Hugo website

Hello,

I’m creating a standard document in Hugo format, and I need to save it as a PDF. However, when I do that, the document ends up without top and bottom margins. How can I add margins to the pages?

I’ve tried using the following code:
@page {
margin-top: 20px;
}

But it didn’t work. Does anyone know how to solve this?

Care to at least use google translate?

Your CSS is fine. I suspect your print driver settings are overriding the CSS. Margins should be set to default.

Screenshot-20230624094450-372x468

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.