Skip to content

White page added with @page named #233

@Zefling

Description

@Zefling

In this case, a blank page is added before the first styled page:

<html>
<head>
<style>
/* The following fonts are installed on the server: */
.handwriting {
  font-family: 'handwriting', serif;
}
.arabic {
  font-family: 'arabic', serif;
}
.deja {
  /* Contains glyphs for many languages. */
  font-family: 'deja-sans', sans-serif;
}
/*
Also you can use the PDF built-in fonts: 
 - sans-serif
 - serif
 - monospace
*/

@page test {
  size: A4;
  margin: 3.5cm 1.5cm 2.5cm 1.5cm;
}
.pagetest{ 
  page : test 
}

</style>
</head>
<body>
<div class="pagetest">
<div class="handwriting" style="text-align:center;font-size: 90px;color:orange;">
Hello World!
</div>
</div>
</body>
</html>

I tested several cases, the first page is necessarily @page unnamed.For generated content (for example, with mustache) where the first page would be present or not, it really complicated the implementation.

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