ckeditor4 icon indicating copy to clipboard operation
ckeditor4 copied to clipboard

Option for the docprops plugin to generate @page style + new option fields for define page size with orientation, and a new tab for page headers and footers

Open SuperPat45 opened this issue 4 years ago • 0 comments

Type of report

Feature request

Provide description of the new feature

It will be interesting to extend the docprops plugin to add on option allowing this plugin to generate @page CSS style for better page setup and printing.

When the option is enabled, we could also take the opportunity to add some options fields in the dialog box such as page size with orientation, and a new tab for page headers and footers.

Example of CSS style what could be generated and injected it in the document:

@page {
  margin: 2cm 3cm;

  size: A4 portrait; 
  // size: landscape; 
  // size: auto; 
  // size: 21cm 29.7cm;

  counter-increment: page;

  @top-center {
    content: "My document title";
  }; 
  @bottom-right {
    content: "Page " counter(page) " / " counter(pages);
  }; 
} 

The @page CSS at-rule is well-supported, except Safari, size property is only supported by Chrome and derivates: https://developer.mozilla.org/fr/docs/Web/CSS/@page

SuperPat45 avatar Sep 10 '21 15:09 SuperPat45