The project presents the markdown templates for MPE (Markdown Preview Enhanced) extension to generate PDF pages with header, footer and page break via with Chrome (puppeteer). The settings are demonstrated in the front matter of markdown file.
Editor and extension are listed as following:
-
clone or copy the .md files to the local folder
-
use or change the front matter settings in md file.
-
if you want to generate header with a different logo,
- use a tool to convert the logo image to a base64 string
- replace this string in the template with logos.
๐ Template with Logo header : avoid messy format
The long base64 string make the file looks messy. The solution is to use two files.
input the content in another file, e.g. document_content.md
define the header, footer and title in header file
use "@import" in the header file to import the content.
-
simple_header_footer.md template with title in header, and page number in footer.
-
complex_header_footer.md: template with title/version in header, date/copyright/page number in footer
-
vscLogo_header_footer.md: adds the VS code logo.
-
document_content.md separate file for the content input, used with the logo templates
This project is inspired by the following projects and issue discussions.