djfdyuruiry / pretty-markdown-pdf Goto Github PK
View Code? Open in Web Editor NEWConvert Markdown to a Pretty PDF :D
License: MIT License
Convert Markdown to a Pretty PDF :D
License: MIT License
Hi I used the package to create tweeted images like
https://pbs.twimg.com/media/EWmK_mQX0AAwXpg?format=jpg&name=medium
I guess it have apply some styling to it but not sure what. Can you please direct me how to auto-size to content?
prettyMdPdf.convertMdToPdf({ markdownFilePath: "my-doc.md" })
should be
prettyMdPdf.convertMd({ markdownFilePath: "my-doc.md" })
This is also valid for the other occurrences in the ReadMe.md File.
A lot of different systems use front-matter in markdown for meta-data. At the moment this data gets rendered by markdown-it.
I think front-matter should not get rendered!
Maybe the introduction of markdown-it-front-matter could help here?
[![name](Images/name.png)](http://www.name.com)
when the image URL is relative then it does not render the image, in the marked package we can give the base URL
marked.parse(
this.mdFileData,
{
renderer: this.renderer,
baseUrl: SERVER_URL,
},
);
[pretty-md-pdf] Converting markdown file: DOCUMENTATION.md
[pretty-md-pdf] Converting (convertMarkdownToHtml) ...
Deprecated as of 10.7.0. highlight(lang, code, ...args) has been deprecated.
Deprecated as of 10.7.0. Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277
[pretty-md-pdf] Exporting (pdf) ...
[pretty-md-pdf] Exported to file: DOCUMENTATION.pdf
Own highlight style will not be replaced but appended:
"highlightStyle": "c:\configFile.json",
output:
ENOENT: no such file or directory, access
'C:\Users\username\AppData\Roaming\npm\node_modules\pretty-markdown-pdf\node_modules\highlight.js\styles\c:\configFile.json'
For the daily work I use IntelliJ with its Markdown plugin.
In order to display plant uml diagrams using that, following syntax is suggested (please ignore the extra spaces between ` characters):
` ` `puml
Bob -[#red]> Alice : hello
Alice -[#0000FF]->Bob : ok
` ` `
this also works
` ` `puml
@startuml
Bob -[#red]> Alice : hello
Alice -[#0000FF]->Bob : ok
@enduml
` ` `
However, none of the above works with pretty-markdown-pdf. I need to use the below, which is not supported by the IntelliJ environment:
@startuml
Bob -[#red]> Alice : hello
Alice -[#0000FF]->Bob : ok
@enduml
It seems to me that the IntelliJ's syntax is closer to Markdown specification. Can it be supported by pretty-markdown-pdf?
This Visual Studio plugin suggests the syntax below, also supported by IntelliJ, maybe that would be the most compatible:
` ` `plantuml
@startuml
Bob -[#red]> Alice : hello
Alice -[#0000FF]->Bob : ok
@enduml
` ` `
Trying to run an export with the following configuration:
{
"executablePath": "/c/Program Files/Google/Chrome/Application/chrome.exe"
}
With pretty-md-pdf -i test.md -c <config path>
I am on ubuntu, through the WSL on Windows 10.
Export hands indefinitely on:
[pretty-md-pdf] Exporting (pdf) ...
Other export types hang the same way
Puppeteer download is a little bit slow, so is it possible to let it optional, so I can let my users use custom location, maybe use Chrome instead.
I find out the puppeter-core may work at here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.