yzane / vscode-markdown-pdf Goto Github PK
View Code? Open in Web Editor NEWMarkdown converter for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf
License: Other
Markdown converter for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf
License: Other
Is it possible to insert page breaks? If so how? Thanks
I have the markdown file and the css file in the same folder at the same level.
I added the file path to my css as following
{
"markdown-pdf.breaks": true,
"markdown-pdf.styles": [
"E:/MarkDown/vscode/my.css" // OK
]
}
This works but as the path is absolute moving the folder will break css
I also tried to add the following paths
{
"markdown-pdf.breaks": true,
"markdown-pdf.styles": [
".//my.css" //DID NOT WORK
".\my.css" //DID NOT WORK
"my.css" //DID NOT WORK
]
}
I believe this should have worked but did not. Let me know if I am missing anything here.
Hello,
Is it possible to support custom scripting that renders images.
I more specificaly do use mermaid in my markdowns that are nicely renderd in vscode by its extention:
https://github.com/vstirbu/vscode-mermaid-preview
I did open an issue with them also:
Mermaid-Chart/vscode-mermaid-preview#47
Thanks
This elements do not work for HTML output.
Will there be a change?
"markdown-pdf.footer.contents": "
"markdown-pdf.header.contents":
I tried converting a markdown file on Mac OS and got the following information:
ERROR: phantomjs binary does not exist: /Users/Hahaha/.vscode/extensions/yzane.markdown-pdf-0.1.7/node_modules/phantomjs-prebuilt/lib/phantom\bin\phantomjs.exe
Is there something wrong? Or does it only work on Windows?
Hi,
I'm having problems using vscode with "windows1252" as default files encoding.
Whenever I use accented chars, even if I can see them previewed correctely, they became unknown chars when I try to convert the markdown doc to pdf.
Is there a way (maybe some css style file to edit) to change the output encoding so they match?
Hi!
First of all, thank you for the plugin, it's great!
Then I wonder if it would be possible to easily use the tool in a build process, so the file or stream could be used in a different task?
Thank you!
Regards Tim
Before anything else, seriously well done on this project - it's great work!
I just wanted to know if it's possible to have settings.json accept relative paths for the markdown-pdf.styles?
Something like this:
"markdown-pdf.styles": [ ".vscode/md.css" ]
Hi,
I am trying to use a custom stylesheet but it does not work as expected. I've saved the CSS into ~.vscode-insiders/markdown-pdf.css
and added "markdown-pdf.styles": [".vscode-insiders/markdown-pdf.css"]
to my settings. Am I doing something wrong?
Thanks
Peter
Although no error message is displayed, the output file is not created because the permission is insufficient.
I was able to generate a pdf once, but since then I keep getting 2 errors they are EACCES: permission denied, open 'something.pdf'
and ERROR: exportPdf()
. Obviously, they are related since they both appear every time. There are 2 files I am trying to generate PDFs of one I previously generated but deleted since I needed to change the formatting. I am running vscode version 1.20.0. I tried closing and re-opening vscode to make sure it wasn't a bug with the editor but that did not help.
Hi,
I can't manage to get internal links in the exported PDF, even if they works in VSCode Markdown Preview.
Is there a way to get them working?
I'm using VSCode v1.16.1 in Windows 10 and Markdown PDF v0.1.7
I can't see links working on a generated pdf from markdown to pdf extension. TOC extension is working on default markdown preview on VSCode.
Steps to Reproduce:
If you have any plans to solve this reporting please tell me.
Markdown PDF fails on OS X becasue the path to Phanotmjs is Windows-specific:
/lib/phantom\bin\phantomjs.exe and switch to *nix-style path
It would be good to make this path adapt to the appropriate location when the extension is installed on OS X/*nix. See #22
Hi,
The overall extension works as it should be but notices a small bug when was converting a doc from md.
to .pdf
.
The issue was that I got blank spaces where ever I used emojis in my markdown
file.
Added images for better understanding.
Checkboxes are rendered in the PDF when using "[ ]" string but I can't style them with CSS (it works for headings etc. so the CSS file is found)
I tried the following CSS:
input[type=checkbox] {
border: 1px solid #FA0101;
}
input {
border: 1px solid #3300F7;
}
input:checked {
border: 1px solid #00FF30;
}
[checkbox=unchecked] {
border: 1px solid #F2FF00;
}
[checkbox=checked] {
border: 1px solid #00FBFF;
}
Btw.: is there a way to see the generated HTML to debug such problems?
This is really weird. I'm a vscodevim user. Every time after I installed markdown-pdf the vim extension will stop working. These two extensions cannot run at the same time. If I disable one to use another everything runs fine.
Please let me know if I can provide any other information.
Is it possible to auto generate Table of contents as it is with Pandoc with latex
here is the link to the pandoc docs http://pandoc.org/MANUAL.html#general-writer-options
This feature would be immensely helpful, as there are extensions that produce previews but not conversion into documents
It would be nice if markdown-pdf.type could be a list, to generate PDF & HTML files the same time.
Perhaps somethink like
{
"markdown-pdf.type": "pdf,html",
"markdown-pdf.type": ["pdf","html"],
}
Can't insert image in header or footer. It would be great to implement this feature
I want to put some logo on the header on every pages.
Could you please give us the example?
PS. such a wonderful plugin! I could say!
Thank you for offering such a nice plug-in.
I tried using HTML in my .md
file:
<img src="test.png" width="800" height="900" />
The preview results show the picture correctly, in line with my expected size.
In the generated file, the picture was blurry and not clear. I tried to change the .css
file, but it didn't work.
Sorry, I'm not good at English. The description is a little confusing, but I really hope to get your help!
Hello,
I am using the plugin and it is very very helpful. Thanks.
I highlighted the syntax with monokai.css
theme.
But what I find missing are line numbers in the highlighted code.
Can it be possible to implement this feature?
This is a bug in the markdown-it-checkbox.
aaa [ ] bbb
โ
[ ] bbb
I will consider how to deal with it.
Hey, I installed your extension into VS Code 1.9.0 on Windows 7.
But when I try to convert a file I only get "undefined" as text in the resulting PDF.
No errors are displayed in either console or developer tools.
Any ideas?
VSCode 1.9.1
markdown-pdf 0.1.6
platform: win10, OS X
I observe too small font in pdf generated on machine with HighDPI display. It would be fine to have some display- and system-independent settings for font size.
I would like to request the ability to use globbing in the config to exclude other markdown files except the ones the globbing hits.
Alternatively I would be fine with a simple ignore files array inside of the configs. Maybe globbing could be enabled in that ignore later?
Note: This feature would be extremely useful with in conjunction with convertOnSave
Also I add the js
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" });
</script>
in template.html, can export correct html ,but not pdf
Cross-referencing this issues mjbvz/vscode-markdown-mermaid#6.
We would like to have these very nice Mermaid diagrams exportable.
Hi!
It would be nice to disable the default CSS if I'm using my own custom CSS with the markdown-pdf.styles
option as the default one can interfere with custom styling.
All you have to do is to make the inclusion of the default CSS dependent of the number of defined custom styles. (Basically move lines 430
and 431
to the else
branch of the if
on line 435
in extension.js
)
vscode-markdown-pdf/extension.js
Line 430 in ff211ed
Proposed code snippet (extension.js
)
// 1. read the style of the markdown.styles setting.
styles = vscode.workspace.getConfiguration('markdown')['styles'];
if (styles && Array.isArray(styles) && styles.length > 0) {
for (i = 0; i < styles.length; i++) {
var href = filename = styles[i];
var protocol = url.parse(href).protocol;
if (protocol === 'http:' || protocol === 'https:') {
style += '<link rel=\"stylesheet\" href=\"" + href + "\" type=\"text/css\">';
} else if (protocol === 'file:') {
style += makeCss(filename);
}
}
} else {
// 2. read the style of the vscode.
filename = path.join(__dirname, 'styles', 'markdown.css');
style += makeCss(filename);
}
Another option would be to include a markdown-pdf.useDefaultStyle
setting.
How to render the current date in the header of HTML output?
An error occurs if css file is specified with relative path in markdown-pdf.styles.
Running the contributed command:'extension.markdown-pdf' failed.
If you convert the markdown file after opening the folder with vscode, no error will occur.
The footer gives option to set page numbes as shown
"markdown-pdf.footer.contents": "<div style=\"text-align: center; margin-top: 0.5cm;\">{{page}}/{{pages}}</div>"
However the page number starts from the first page, I want to offset it and want the page numbering to begin on the 5th page
Is it possible to add such a feature?
Hey,
I tried to export a markdown file to pdf and html but it failed with
"markdown-pdf.type": "pdf, html"
Is it somehow possible to achieve this without switching the settings all the time?
Best regards
I can specify an absolute path but how do I specify a path relative to where the markdown file is located?
Great tool by the way. Awesome work!
Hi:
I've been experimenting with this extension and I'm having trouble to generate level 1 headers using the syntax:
# Header content
It simply doesn't recognize it and generates the text as is (with the hash shown) when I convert to PDF using the extension.
Are you experiencing this problem?
Thanks for your work!
I would like to see the feature where it would be possible to link to headers of the same file. This can be used to create table of contents
The extension sends an info message each time it generates a PDF, those are intended for users to do something about them (basically to give users important information).
Since the message sent if it is a successful save is one that really doesn't need the user to do anything, having it be a statusbar message would be much better. (Errors should remain as they are now though).
The reason I mention this is that I save my file quite often, so the info bar often obscures my tabs, making it very annoying.
Can't include images that contains "#" in the local path.
ex:
sample.md
![IMG](IMG.png)
Result | Path |
---|---|
OK | D:\CSharp\sample.md |
NG | D:\C#\sample.md |
Markdown PDF 0.1.6
version 1.9.1
commit f9d0c687ff2ea7aabd85fb9a43129117c0ecf519
date 2017-02-09T00:26:45.394Z
shell 1.4.6
render 53.0.2785.143
Node 6.5.0
Thank you very much for your excellent plugin at first!
I wonder if i cause one issue, while finish my markdown doc, i try to export to pdf, but found that all the HyperLink and A tag were disabled. Click it but no work.
If there somewhere i was missing, pls leave me tip, thank you!
Regards,
Marksion
I have been trying to change the font size. The size was too big. I have tried to change the markdown.preview.fontSize
from 14 to 11 but the final pdf is not changed.
I don't see the settings for changing font size in mardown-pdf settings.
Any suggestion ??
Hello,
Inline code like this
do not use a proportional font when converted to PDF, contrary to the markdown preview in VSCode as you can see:
It seems that font-family: inherit
in markdown-pdf.css
causes the problem:
/* for inline code */
:not(pre):not(.hljs) > code {
color: #A31515;
font-size: inherit;
font-family: inherit;
}
Trying to generate a pdf, and keep getting this error:
ERROR: phantomjs binary does not exist: C:\Users\user_name\.vscode\extensions\yzane.markdown-pdf-0.1.4\node_modules\phantomjs-pre
I have tried running the command several times, but still keep getting this error.
I can't actually open the .pdf it generates. Please excuse me if its a trivial problem - I am new to using VSC. I also installed Auto-open Markdown packages.
Thanks in advance.
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.