chromium browser: how to set print parameters (A4 / A3, orientation etc)?

Problem

There are any way to add print parameters when using window.print() ?

Problem courtesy of: user1338054

Solution

You can use the CSS3 rules:

@page {
  size: A4 portrait;
  margin: 27mm 16mm 27mm 16mm;
  counter-increment: page;
  @bottom-right {
    content: "Page " counter(page) " of " counter(pages);
  }
}

But some user agents do not support the pages counter and will ignore any content that includes that counter, so to cover all UAs, do:

@page {
  size: A4 portrait;
  margin: 27mm 16mm 27mm 16mm;
  counter-increment: page;
  @bottom-right {
    content: "Page " counter(page);
    content: "Page " counter(page) " of " counter(pages);
  }
}

Read more about the CSS3 Paged Media Module here

Solution courtesy of: ArtBIT

Discussion

There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.