Skip to content

Instantly share code, notes, and snippets.

@tonydewan
Created January 24, 2017 21:39
Show Gist options
  • Save tonydewan/39797e1b790f076ccb004ac31f3d6af5 to your computer and use it in GitHub Desktop.
Save tonydewan/39797e1b790f076ccb004ac31f3d6af5 to your computer and use it in GitHub Desktop.
DocRaptor - different header on each page
<html>
<head>
<style>
.header-content {
string-set: headercontent content();
}
@page {
@top {
content: string(headercontent);
}
}
.page {
page-break-before: always;
}
</style>
</head>
<body>
<div class="page">
<div class="header-content">Page 1</div>
<h1>Page 1</h1>
</div>
<div class="page">
<div class="header-content"></div>
<h1>Page 2</h1>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment