Skip to content

Problem with page margins when using @page:first rule #119

@Bigdatha

Description

@Bigdatha

Hello,

I am trying to create a PDF file which has a kind of banner on the right side of the first page.

So i used the @page, @page:first and the @right-top rules to adjust the page margins and to insert the additional content:

@page {
  size: A4 portrait;
  margin: 10mm 5mm 15mm 20mm;
}

@page:first {
  margin-right: 55mm;
  @right-top {
    padding: 1mm;
    content: 'Some additional content\00000a@right-top\00000a(but only on the first page)';
    white-space: pre;
    vertical-align: top; text-align: left;
    background: #ffeeee;
  };
}

This works perfect for the first page, but on the follwing ones, the right margin defined in the @page:first rule is still used instead of the default value defined in the @page rule (by the way, similar effects arise when using the @page:left or @page:right rules).

For clarification please have a look at Template.html.txt and Template.pdf

Thanks,
Bigdatha

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions