Generating PDF files with multiple pages messes up design

Thank you;
Anyone that might have the same isse:
I changed the following in style:

@page {
    margin-left: $global_margin;
    margin-right: $global_margin;
    margin-top: 0;
    margin-bottom: 0;
    size: $page_size $page_layout;
}

to

@page {
    margin-left: $global_margin;
    margin-right: $global_margin;
    margin-top: 10;
    margin-bottom: 10;
    size: $page_size $page_layout;
}