Giter VIP home page Giter VIP logo

vscode-markdown-pdf's People

Contributors

andre-stoesel avatar cedric-m avatar glenasmith avatar hirschmann avatar jc-nr avatar kororos avatar madacol avatar malys avatar manuth avatar martilidad avatar migrap avatar mtausig avatar poke avatar ppqn-as avatar tigerhawkvok avatar vimtaai avatar yzane avatar zachvalenta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-markdown-pdf's Issues

Image in table not shown in output pdf

The markdown file is like following:

<img src="test.png">

| Image |
| --- |
|<img src="test.png">|

Preview in vscode:
screenshot from 2018-02-10 15-19-47

But in generated pdf, only the first image (outside table) is rendered.
screenshot from 2018-02-10 15-21-48

I'm using vscode 1.19.1 and Markdown PDF 0.1.7.

Any help? Thank you very much!

Relative CSS File paths

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.

HTML Export with Footer / HEader

This elements do not work for HTML output.
Will there be a change?

"markdown-pdf.footer.contents": "
"markdown-pdf.header.contents":

Phantom js problem on Mac OS

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?

Default pdf output text encoding

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.

  • here's the screenshot of the editor and the preview:

test_1

test_2

  • and here a screen of the converted pdf:

test_3

Is there a way (maybe some css style file to edit) to change the output encoding so they match?

Is it possible to use in a task runner like gulp?

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

Relative paths in settings.json?

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" ]

[BUG] Custom PDF style not being used

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

Output file is not created

Although no error message is displayed, the output file is not created because the permission is insufficient.

EACCES: permission denied

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.

Broken internal links

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

TOC extension not working on Convert Markdown to PDF

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.

  • VSCode Version: 1.15.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Write a nice markdown text (with many #, ## and ###)
  2. Enable TOC on Markdown (with Markdown TOC extension)
  3. Convert Markdown to PDF (with Markdown to PDF extension)

If you have any plans to solve this reporting please tell me.

Windows-specific path to Phantomjs fails on OS X/*NIX

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

Blank spaces where emojis were used.

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.


screen shot 2018-02-15 at 5 31 04 pm

๐Ÿ‘†๐Ÿผ content of `markdown` file

screen shot 2018-02-15 at 5 30 44 pm

๐Ÿ‘†๐Ÿผ content of `pdf' file.

I can't style checkboxes

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?

conflict with vscode vim

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.

Define Multiple outputformats

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"],
}

Images in header

Can't insert image in header or footer. It would be great to implement this feature

How do I change the image size in the conversion results?

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!

Syntax highlighted with line numbers

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?

PDF output only contains "undefined"

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?

The font size of final pdf depends on display scaling (win10)

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.

How to repoduce (win10)

  1. take arbitrary non-empty .md document
  2. in Preferences/System change magnification ration ("Change the size of text, apps, and other items")
  3. generate pdf in VSCode
  4. repeat 2-3 for different settings
  5. compare pdfs

Enable glob / regexp filtering or ignore files?

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

how to export pdf with latex

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

Exclude default CSS if the `styles` configuration is set

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)

filename = path.join(__dirname, 'styles', 'markdown.css');

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.

Relative path error of markdown-pdf.styles

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.

Page number start form a specific page

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?

Multiple Exports Formats?

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

H1 headers not recognized

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!

Replace info messages with statusbar messages.

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.

Not correctly rendering Windows 1252 encoding

Not correctly rendering .md documents with Windows 1252 encoding:

For example the following md

abcdefghijklmnopqrstuvwxyz
ร  รง รฉ รจ รช รป 

exports as :

abcdefghijklmnopqrstuvwxyz ๔€€  ๔€€  ๔€€  ๔€€  ๔€€  ๔€€ 

image

btw, thanks for a great tool :)

Can't include images that contains "#" in the local path

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

After export to pdf, all the HyperLink and A tag were disabled

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

How to change font size of generated pdf

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 ??

Inline code blocks do not use a proportional font

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:
markdown-pdf_inline_code_font

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; 
}

ERROR: phantomjs binary does not exist

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.

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.