New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF export #122

Open
alexrussell opened this Issue Aug 19, 2014 · 12 comments

Comments

Projects
None yet
8 participants
@alexrussell

alexrussell commented Aug 19, 2014

PDF export would be pretty handy. Failing that, the ability to print the Markdown preview (or, in fact any editor) would allow me to save as a PDF. Added bonus is that it'd put less emphasis on exporting the styles in the HTML generated from #70 (at least for me).

@izuzak izuzak added the enhancement label Aug 19, 2014

@travs

This comment has been minimized.

Show comment
Hide comment
@travs

travs Nov 4, 2014

You can check out my project to export .md to pdf before this is added as an enhancement to markdown-preview.
Let me know what you think/any additional functionality you would like 😄

travs commented Nov 4, 2014

You can check out my project to export .md to pdf before this is added as an enhancement to markdown-preview.
Let me know what you think/any additional functionality you would like 😄

@blackfist

This comment has been minimized.

Show comment
Hide comment
@blackfist

blackfist Nov 12, 2014

+1. Right now I'm using an app called lightPaper to turn markdown into PDF. I would love to be able to do this from Atom and have one less app I gotta worry about.

blackfist commented Nov 12, 2014

+1. Right now I'm using an app called lightPaper to turn markdown into PDF. I would love to be able to do this from Atom and have one less app I gotta worry about.

@morberg

This comment has been minimized.

Show comment
Hide comment
@morberg

morberg Jan 15, 2015

+1 for printing. For generating PDF @travs markdown-pdf works very well and even uses the styles from markdown-preview.

morberg commented Jan 15, 2015

+1 for printing. For generating PDF @travs markdown-pdf works very well and even uses the styles from markdown-preview.

@burnalting

This comment has been minimized.

Show comment
Hide comment
@burnalting

burnalting Jan 22, 2015

all, I am struggling to get @travs markdown-pdf to work. I have the latest atom (0.174.0) on a patched Windows 8.1 workstation and I have markdown-pdf (1.3.0). I have the simplest of .md files

This is a first level heading

This is a second level heading

and markdown-preview displays it correctly, but I can get nothing from C whilst the cursor is within the markdown document display. Do I need something else running on Windows for this to work or do I need to configure more elements of atom?

burnalting commented Jan 22, 2015

all, I am struggling to get @travs markdown-pdf to work. I have the latest atom (0.174.0) on a patched Windows 8.1 workstation and I have markdown-pdf (1.3.0). I have the simplest of .md files

This is a first level heading

This is a second level heading

and markdown-preview displays it correctly, but I can get nothing from C whilst the cursor is within the markdown document display. Do I need something else running on Windows for this to work or do I need to configure more elements of atom?

@travs

This comment has been minimized.

Show comment
Hide comment
@travs

travs Jan 22, 2015

@burnalting
Raise an issue on the repo and let's try and solve it!

travs commented Jan 22, 2015

@burnalting
Raise an issue on the repo and let's try and solve it!

@burnalting

This comment has been minimized.

Show comment
Hide comment
@burnalting

burnalting Jan 22, 2015

Hi tavs,

I just installed atom on a clean fedora 21 and it works. I needed to ensure a markdown-preview had
rendered the .md file, but the C resulted in a valid pdf.

I can operate in fedora 21 but I will raise the issue against a Windows 8.1 system

burnalting commented Jan 22, 2015

Hi tavs,

I just installed atom on a clean fedora 21 and it works. I needed to ensure a markdown-preview had
rendered the .md file, but the C resulted in a valid pdf.

I can operate in fedora 21 but I will raise the issue against a Windows 8.1 system

@burnalting

This comment has been minimized.

Show comment
Hide comment
@burnalting

burnalting Jan 22, 2015

Hi Travs,

Please excuse my stupidity. On my windows system I had left .pdf files generated by another tool (on a cross mounted Linux system). When nothing appeared to have happened when I pressed C, I assumed an error and didn't look at the file.

My hint was when I attempted to turn a markdown file into pdf on my Fedora 21 box ... it complained that I couldn't write to the directory where the .md file lived.

Perhaps you can update the documentation for your (excellent) package by saying, something to the effect, "Position your mouse/cursor over your .md editing pane, then press C. At this point check the directory where your .md file resides and you should find a pdf of the same file name base. Note it may take some seconds".

The reason for saying and excellent package is that I have been looking for a markdown to pdf process that will scale the .png files I have in my .md file. Yours (perhaps in concert with the markdown-preview code), does the scaling.

Apologies for my failure to understand my base problem.

But a big thank you for you package

Sincerely
Burn

burnalting commented Jan 22, 2015

Hi Travs,

Please excuse my stupidity. On my windows system I had left .pdf files generated by another tool (on a cross mounted Linux system). When nothing appeared to have happened when I pressed C, I assumed an error and didn't look at the file.

My hint was when I attempted to turn a markdown file into pdf on my Fedora 21 box ... it complained that I couldn't write to the directory where the .md file lived.

Perhaps you can update the documentation for your (excellent) package by saying, something to the effect, "Position your mouse/cursor over your .md editing pane, then press C. At this point check the directory where your .md file resides and you should find a pdf of the same file name base. Note it may take some seconds".

The reason for saying and excellent package is that I have been looking for a markdown to pdf process that will scale the .png files I have in my .md file. Yours (perhaps in concert with the markdown-preview code), does the scaling.

Apologies for my failure to understand my base problem.

But a big thank you for you package

Sincerely
Burn

@travs

This comment has been minimized.

Show comment
Hide comment
@travs

travs Jan 22, 2015

@burnalting
No sweat man. Yeah the docs haven't been updated in a while, so I'll jump on that and make it more clear.

Thanks for the compliment as well! 😄

travs commented Jan 22, 2015

@burnalting
No sweat man. Yeah the docs haven't been updated in a while, so I'll jump on that and make it more clear.

Thanks for the compliment as well! 😄

@travs travs referenced this issue Jan 25, 2015

Closed

Update docs #32

cakebake added a commit to cakebake/markdown-themeable-pdf that referenced this issue Aug 20, 2015

@cakebake

This comment has been minimized.

Show comment
Hide comment
@cakebake

cakebake Aug 20, 2015

Added a new context menu to cakebake/markdown-themeable-pdf for context menu "Save As PDF" in markdown-preview pane.

UPDATE: Currently it does not work on all systems. CTRL-SHIFT-P -> Window: Reload after Package Update works.

save-as-pdf

cakebake commented Aug 20, 2015

Added a new context menu to cakebake/markdown-themeable-pdf for context menu "Save As PDF" in markdown-preview pane.

UPDATE: Currently it does not work on all systems. CTRL-SHIFT-P -> Window: Reload after Package Update works.

save-as-pdf

@benogle

This comment has been minimized.

Show comment
Hide comment
@benogle

benogle Oct 13, 2015

Contributor

Note that there are printing APIs in electron now: http://electron.atom.io/docs/v0.33.0/api/web-contents/#webcontents-print-options

Though might be tricky to just print the contents of the tab with all the correct styles (not the entire UI)

Contributor

benogle commented Oct 13, 2015

Note that there are printing APIs in electron now: http://electron.atom.io/docs/v0.33.0/api/web-contents/#webcontents-print-options

Though might be tricky to just print the contents of the tab with all the correct styles (not the entire UI)

@alexrussell

This comment has been minimized.

Show comment
Hide comment
@alexrussell

alexrussell Oct 14, 2015

@cakebake thanks for the heads-up on your package. I have installed it and will give it a test soon. Looks to be exactly what I want. And the bonus is (or at least seems to be) I can style the HTML how I want for the PDF and have it completely different to the HTML preview in Atom, which means I don't have to worry about the weird uses-your-theme issues with markdown-preview.

The only thing I'm slightly concerned about is that it appears to generate HTML differently to how markdown-preview does, so I could well find that I make the perfect document in Atom and then come to convert it to PDF and certain bits are wrong (I'm obviously thinking about advanced stuff here like tables, HTML, GFM, etc.). Still, that remains to be seen - the fact that you developed this for developers writing documentation sounds ideal as that's what I would use it for.

alexrussell commented Oct 14, 2015

@cakebake thanks for the heads-up on your package. I have installed it and will give it a test soon. Looks to be exactly what I want. And the bonus is (or at least seems to be) I can style the HTML how I want for the PDF and have it completely different to the HTML preview in Atom, which means I don't have to worry about the weird uses-your-theme issues with markdown-preview.

The only thing I'm slightly concerned about is that it appears to generate HTML differently to how markdown-preview does, so I could well find that I make the perfect document in Atom and then come to convert it to PDF and certain bits are wrong (I'm obviously thinking about advanced stuff here like tables, HTML, GFM, etc.). Still, that remains to be seen - the fact that you developed this for developers writing documentation sounds ideal as that's what I would use it for.

@cakebake

This comment has been minimized.

Show comment
Hide comment
@cakebake

cakebake Oct 14, 2015

@benogle The API is quite simple and effective. Unfortunately, I had problems to realize a header and footer. It is currently not available for me.

@alexrussell Yes, the package renders the Markdown autonomous and independent of the current atom theme. If you have problems with your documents and I can improve the package, feel free to open an Issue in the markdown-themeable-pdf repo.

cakebake commented Oct 14, 2015

@benogle The API is quite simple and effective. Unfortunately, I had problems to realize a header and footer. It is currently not available for me.

@alexrussell Yes, the package renders the Markdown autonomous and independent of the current atom theme. If you have problems with your documents and I can improve the package, feel free to open an Issue in the markdown-themeable-pdf repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment