Git Product home page Git Product logo

md-pdf-convert-markdown-to-pdf's Introduction

BuildcodecovLicense: GPL

About

Converter of Markdown to PDF.

Why another Markdown to PDF converter? Because I want to feed root Markdown file to the application and get complete PDF with all subpages that linked in root file. I tried to find such ready tool, but my search was unsuccessful.

Testing

If you will find a bug of rendering, please, try to localize the issue in short Markdown and reproduce with fonts in tests/fonts folder (Droid Serif for text and Courier New for code). And post the issue here...

Getting from Repository

After clone update submodules with the next command:

git submodule update --init --recursive

Building

To build this application first of all install dependencies of PoDoFo

  • freetype
  • libjpeg
  • libpng
  • zlib

On UNIX you also need

  • fontconfig

Also ImageMagick6 is required.

With these dependencies installed just open CMakeLists.txt in QtCreator and run build.

You can use Conan to install dependencies, only ImageMagick should be installed by hands, as in Conan ImageMagick available version is 7 only, and not all platforms are supported. And Fontconfig should be installed in system, as using Fontconfig from Conan leads to ugly UI. In case using Conan as dependencies manager define MDPDF_USE_CONAN to CMake. Good luck!

And one more thing - don't use jom.

Building with QtCreator and Conan

  • Open CMakeLists.txt with QtCreator
  • CMake process may fail
  • Go into build directory and there launch conan install <path to sources>
  • Run CMake in the QtCreator
  • And voila, run build and everything should go without any problem.

In this stack you can have problems only with ImageMagick, that I don't install with Conan, as there is no build possible on Windows platform with Conan. So be sure you installed ImageMagick 6 and installation is available through the PATH environment, this should be enough to detect ImageMagick. Good luck.

Example

Good example of work of this application is PDF version of my book.

Screenshot

Known issues

  • I do not render HTML tags in Markdown.

  • Some LaTeX Math expressions can be wrongly rendered. I use very good library JKQtPlotter to render LaTeX Math, and not everything is implemented there. But most common math things are done.

  • I don't support Chinese, as they don't use spaces. I don't know theirs rules, to adapt algorithms.

  • I don't support right-to-left languages. I don't know theirs rules too.

If you are one from these groups of people - you are welcome to make PRs to adapt this application to your language.

md-pdf-convert-markdown-to-pdf's People

Contributors

igormironchik avatar

Stargazers

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