GithubHelp home page GithubHelp logo

md-files-to-pdf's Introduction

md-files-to-pdf

Generate a PDF from multiple MarkDown files.

Usage

import {pdfFromMdFiles} from 'md-files-to-pdf';

const options = {
  heading: 'Example',
};

pdfFromMdFiles('path/to/md-files', 'path/to/pdf', options);

Options

{
  heading?: string, // Heading at the top. Default: Folder-Name
  outputHtml?: string, // Path to save the generated HTML file, helpful for debugging
  generateToc?: boolean, // If true, Generate a Table of Contents at the Top of the File
}

CLI-Usage Options

--doc-path "path/to/md-files" // Requiered, Path to Folder with MarkDown files
--out-path "path/to/pdf" // Requiered, Path where the PDF should me saved
--heading "Example" // Optional, Heading at the top. Default: Folder-Name
--output-html "path/to/html" // Optional, save the generated HTML file, helpful for debugging
--generate-toc // Optional, Generate a Table of Contents at the Top of the File

Development

npm run start -- --doc-path ./example_docs --out-path out.pdf --heading Doc-Test

Thanks

Thanks to Simon Hänisch and Contributors for creating md-to-pdf where i looked up some code.

md-files-to-pdf's People

Contributors

its-treason avatar

Watchers

 avatar

md-files-to-pdf's Issues

Add Support for Localy saved images

Images wich are localy saved and used in Markdown files should also be able to be rendered in the PDF.

The render Process then needs to start a WebServer having the rendered HTML and all the images in is Webroot.

Add Quiet Option

Add option in to disable the output of Warnings and info messages

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.