Code Monkey home page Code Monkey logo

mpe-pdf-template's Introduction

Markdown templates for PDF page in MPE

Purpose

PDF Header Footer Generation with MPE

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:

Usage

  1. clone or copy the .md files to the local folder

  2. use or change the front matter settings in md file.

  3. 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.

Files

  1. simple_header_footer.md template with title in header, and page number in footer.

  2. complex_header_footer.md: template with title/version in header, date/copyright/page number in footer

  3. vscLogo_header_footer.md: adds the VS code logo.

  4. document_content.md separate file for the content input, used with the logo templates

Reference

This project is inspired by the following projects and issue discussions.

  1. Github: tmori3y2's project: mpe-puppeteer-header-footer-example

  2. Github: Headers/Footers on PDF! ยท Issue #1028

mpe-pdf-template's People

Contributors

jeffatoptics avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.