markdown-pdf | : page_facing_up : Markdown to PDF converter | Generator Utils library

 by   alanshaw JavaScript Version: v11.0.0 License: MIT

kandi X-RAY | markdown-pdf Summary

kandi X-RAY | markdown-pdf Summary

markdown-pdf is a JavaScript library typically used in Generator, Generator Utils applications. markdown-pdf has a Permissive License and it has medium support. However markdown-pdf has 1 bugs and it has 2 vulnerabilities. You can install using 'npm i markdown-pdf-modified' or download it from GitHub, npm.

markdown-pdf [Coverage Status] ===. Node module that converts Markdown files to PDFs. The PDF looks great because it is styled by HTML5 Boilerplate. What? - Yes! Your Markdown is first converted to HTML, then pushed into the HTML5 Boilerplate index.html. Phantomjs renders the page and saves it to a PDF. You can even customise the style of the PDF by passing an optional path to your CSS and you can pre-process your markdown file before it is converted to a PDF by passing in a pre-processing function, for templating.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              markdown-pdf has a medium active ecosystem.
              It has 2537 star(s) with 256 fork(s). There are 35 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 85 open issues and 91 have been closed. On average issues are closed in 127 days. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of markdown-pdf is v11.0.0

            kandi-Quality Quality

              markdown-pdf has 1 bugs (0 blocker, 0 critical, 1 major, 0 minor) and 0 code smells.

            kandi-Security Security

              markdown-pdf has 2 vulnerability issues reported (0 critical, 1 high, 1 medium, 0 low).
              markdown-pdf code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              markdown-pdf is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              markdown-pdf releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.
              markdown-pdf saves you 243 person hours of effort in developing the same functionality from scratch.
              It has 591 lines of code, 0 functions and 15 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed markdown-pdf and discovered the below as its top functions. This is intended to give you an instant insight into markdown-pdf implemented functionality, and help decide if they suit your requirements.
            • Make a PDF
            • Check if argument is string
            • the main class
            • get the elements of the first element
            • Finds the i .
            • Returns a clone of a element
            • return a document fragment
            • mixin function
            • Shortcut for elements
            • Check if argument is a string
            Get all kandi verified functions for this library.

            markdown-pdf Key Features

            No Key Features are available at this moment for markdown-pdf.

            markdown-pdf Examples and Code Snippets

            No Code Snippets are available at this moment for markdown-pdf.

            Community Discussions

            QUESTION

            Change font and color for figure captions in Rmarkdown in PDF output
            Asked 2021-Jun-13 at 11:58

            I'm wondering how to change font and color specifically for figure captions in Rmarkdown for a PDF output. I know how to do this for word output (creating a separate document), but often figures are submitted to journals as PDFs.

            Note that this is not whether you can change the color of text in a PDF which is answered here: Changing the font size of figure captions in RMarkdown pdf output. If I try this within the fig.cap = "fig text here.\\label{...}" I get the following error:

            ...

            ANSWER

            Answered 2021-Jun-13 at 11:58

            QUESTION

            How to place table of contents on separate page using Knitr for PDF without using separate files?
            Asked 2021-Apr-29 at 08:48

            I am writing a report using Knitr and Rmarkdown. I have a table of contents that, annoyingly, ends up on the same page as the abstract, title etcetera.

            How can I place it on a separate page?

            I found this solution, but for one it doesn't seem to work for me and it is bothersome to start using separate files. It feels as this should be easy to do. Reproducible example below.

            ...

            ANSWER

            Answered 2021-Apr-29 at 08:48

            You could add \\clearpage at the end of your abstract. Therefore, it would become:

            Source https://stackoverflow.com/questions/67312729

            QUESTION

            How to preview and print in PDF a markdown file with a file-specific CSS stylesheet in VS Code?
            Asked 2020-Jul-23 at 15:24

            Here is my use case:

            I want to create a markdown document (my CV for instance) and create a style for it using a CSS file. Then I want to print the PDF of my file.

            I have installed the Markdown PDF extension in VS Code and it does its job.

            To have the extension and the preview to properly render the styling, I changed the settings in vscode setting.json for both extensions to use my CSS file and it works.

            For the preview:

            ...

            ANSWER

            Answered 2020-Jul-23 at 15:24

            Using workspace specific settings solves my issue.

            It does not allow to use one CSS per markdown file, but it's good enough: I can put all my CVs in one folder with the CV CSS in the workspace settings and my reports in another workspace with another CSS stylesheet

            Source https://stackoverflow.com/questions/63056137

            QUESTION

            Trouble inserting Latex in Rmarkdown/knitr beamer presentation
            Asked 2020-May-14 at 12:50

            I'm having trouble with knitting a PDF from an Rmarkdown document. I've reviewed this question, but couldn't quite figure out how to apply it to this context.

            Here is my RMD "setup" prior to running the code.

            Above is the YAML and libraries needed for the reprex below. This is a beamer output, with default to slide levels when there is a ### TITLE, with slide content by the R chunk below it. There are several sections of issues. Please let me know if I can improve my reprex to better ask/learn on SO.

            When I use the compareGroups package on R, it creates a latex output. This works in a traditional PDF, but not for Beamer. I think that has to do with somehow letting the rmarkdown know that the output should be preserved and placed directly in the Tex file. But, I'm not sure.

            ...

            ANSWER

            Answered 2020-May-14 at 12:50

            You can make the code work with this little trick:

            Source https://stackoverflow.com/questions/61779082

            QUESTION

            Company logo in PDF output only on the first page
            Asked 2019-May-27 at 15:23

            I was wondering if there is a way to include the company logo to a PDF document created by R Markdown only on the first page of the document. I have searched for an answer and the closest I could find is this. There are multiple solutions presented in the answers, however, neither of them works for me because they either:

            • include the logo at every page of the document (not just first); or
            • include the chapter title in the header (and a horizontal line below it) along with the logo.

            I am looking for a way to include just the plain logo, with no chapter titles only on the first page of a PDF R Markdown document and I've ran out of all the resources I could find online. Is there someone who could aid me?

            Before anyone asks: yes, it strictly has to be a PDF document, not HTML.

            ...

            ANSWER

            Answered 2019-May-27 at 15:22

            The \includegraphics code line is insert after the R SETUP chunk in markdown. Here is an example of where I put the line \includegraphics :

            Source https://stackoverflow.com/questions/56327814

            QUESTION

            Why doesn't phantomjs page.render capture my D3 svg?
            Asked 2019-May-10 at 18:29

            Why is my D3 visualization not captured by phantomjs? It is the only element on this page not captured and saved as png.

            My oncoprintsave.js file:

            ...

            ANSWER

            Answered 2019-May-10 at 18:29

            I never solved this, but I switched to chrome and got what I want:

            Source https://stackoverflow.com/questions/56031332

            QUESTION

            RMarkdown - different font types in table using kable or huxtable, output to pdf?
            Asked 2019-Apr-12 at 02:52

            Using huxtable, output to html with different fonts for different cells/rows is a breeze. Not so much with pdf. This is not really a new question, but a specific version of RMarkdown - different font types in table using kable? and Change font of Kable in Rmarkdown pdf

            I have used the answer given from https://stackoverflow.com/a/54735453/4927395 to create the output in the image below from rmarkdown (on my windows pc). Note that the 'environment' code will change the font for the table (the whole table), but that text after the chunk is in the font specified for the table. Suggestions to fix that? Also, I could not get the floating example to work on my computer, which is why it is commented out. I like huxtable, but haven't seen examples of the font selected for the table (where it is different to the main font) working on the web. Open to exploring other table packages if absolutely necessary.

            ...

            ANSWER

            Answered 2019-Apr-12 at 02:52

            Indeed, here is how to do this in huxtable (I'm the package owner). You'll need xelatex installed, and the LaTeX "fontspec" package. You’ll also need huxtable version 4.4.0 or above, currently available on github:

            Source https://stackoverflow.com/questions/55280203

            QUESTION

            How to specify a customized paper size in r markdown
            Asked 2019-Feb-05 at 00:30

            I am using R Markdown to produce a booklet with specific height and length measures. Is there a way to specify to R Markdown to produce the article in 5.5"x8.5" measures.

            I saw questions asked about producing A4 size pdf here but that does not help as my measure is very specific.

            ...

            ANSWER

            Answered 2019-Feb-05 at 00:30

            Use the geometry option in the YAML (which becomes options to the geometry package in LaTeX). For example:

            Source https://stackoverflow.com/questions/54526126

            QUESTION

            Bookdown: Cross-reference figure in another file
            Asked 2018-Sep-27 at 12:09

            I have taken the plunge and am preparing a manuscript for publication entirely in RStudio using bookdown. In the main text I would like to cross-reference figures in a separate supporting information .Rmd file.

            Let's say this is my main text file called main.Rmd:

            ...

            ANSWER

            Answered 2018-Jul-30 at 18:12

            I am not entirely sure how you are compiling these two files into a single bookdown document, because as it stands they are just two separate R Markdown documents. But there are two issues:

            1. Figures need a caption to be cross-referenced

            You can only cross-reference figures which have a caption assigned with fig.cap, as explained here:

            If we assign a figure caption to a code chunk via the chunk option fig.cap, R plots will be put into figure environments, which will be automatically labeled and numbered, and can also be cross-referenced.

            1. Incorrectly configured bookdown project:

            From what I can tell, you have not got the project configured correctly for bookdown:

            • The main file should be called index.Rmd
            • Supporting files should not have any YAML
            • You should include site: bookdown::bookdown_site in the YAML of the main documene

            Check out this answer for some tips on a minimal bookdown file.

            Solution

            index.Rmd

            Source https://stackoverflow.com/questions/51595939

            QUESTION

            Module declaration with same name for property and function
            Asked 2018-Aug-06 at 08:27

            I am writing definitions for an existing function module library which exposes the following API:

            ...

            ANSWER

            Answered 2018-Aug-06 at 08:27

            You can't use declaration merging for a field. You can declare the field to conform to the declaration you want by using an intersection type between a function signature and the FromOptionsBuilder interface:

            Source https://stackoverflow.com/questions/51703264

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            A path traversal exists in markdown-pdf version <9.0.0 that allows a user to insert a malicious html code that can result in reading the local files.

            Install markdown-pdf

            Note: elevated (sudo) permissions may be needed for npm install -g.

            Support

            Feel free to dive in! [Open an issue](https://github.com/alanshaw/markdown-pdf/issues/new) or submit PRs.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/alanshaw/markdown-pdf.git

          • CLI

            gh repo clone alanshaw/markdown-pdf

          • sshUrl

            git@github.com:alanshaw/markdown-pdf.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link