Comments (15)
Dear maintainers,
Thanks for this awesome project. Was googling for how to export slides to pdf and end up finding this discussion here. Would like a feature that can do this, but after went through some issue discussion here I understand lots of works are still going on. For anyone want to export slides to pdf, here I offer a workaround for you.
-
Modify the url by appending
?print-pdf
after it. For example, change fromhttps://hackmd.io/p/slide-example#/
tohttps://hackmd.io/p/slide-example?print-pdf
. Note that?print-pdf
must be put before#/
-
Select
print
in the right-click menu. If you only intend to send it as pdf, check thebackground graphics
option and you are in business.
- If you want to print it and find a dark background too ink costly, you might want to uncheck the
background graphics
and use a black font color. Open your browser developer console and enter the following command$("h1, h2, p").css("color", "black")
, then you are good to print. For example, in Chrome browser and Mac OS you pressopt + cmd +j
to open the developer console and paste the magic spell.
Cheers,
Chih-Cheng
from codimd.
Pandoc will export to pdf using it's renderer which is not aware of all the extra components supported by hackmd (eg: mathjax, diagram, google emojis, ... )
Converting the generated html to pdf is the best bet if we want to support all the javascript exotic features. and as a bonus, it will give you the same look/styles that you actually see in hackmd versus a custom renderer which would render with different styles.
from codimd.
What about pandoc (#48) ;)
from codimd.
The "?Print-pdf" feature of the slide no longer works properly.
Now, only the first page can be printed, and the second and subsequent pages can not be printed.
from codimd.
@komikoni Sorry about that. It's an issue of HackMD.io
, CE can use ?print-pdf
properly.
And we've moved all our EE and HackMD.io issues here:
https://github.com/hackmdio/hackmd-io-issues/issues
Please check there.
from codimd.
Why not using wkhtml2pdf on the generated html ?
from codimd.
I don't know wkhtml2pdf before, looks good and will give it a try.
But see from the https://github.com/wkhtmltopdf/wkhtmltopdf/issues
It has lots of issue not solved.
Anyway, thanks for help!
from codimd.
Use markdown-pdf right now, not bad.
from codimd.
Could you add a way to integrate the summary in the pdf export ?
from codimd.
Hi @vincfleurette,
Could you tell more about "the summary" ?
from codimd.
What could be nice is adding a PDF export button for something like https://docraptor.com/ for those who are happy to pay for the conversion. PDF generation is always tedious from things like markdown, but as HTML export is already implemented, it could be a simple solution? Example code on their website on how to POST
HTML to docraptor, and get back a PDF, which you then offer to the user via download... Just a thought...
from codimd.
@amlwwalker good point!
I found out how dillinger did their PDF export yesterday, we might be able to do this too.
https://github.com/joemccann/dillinger/blob/b28fd80445ac02739548d99d79ea6490ac4c7d2d/plugins/core/server.js#L109
from codimd.
Shall we work on this to land the function to export PDF?
from codimd.
@tigercosmos Pull Requests are welcome :)
In general, we have currently a way to export the documents as PDF on self-hosted instances.
Exporting the Slides as PDF would be another nice feature. If you want to implement that feel free to do so. We would love it!
from codimd.
I've just noticed the export to PDF works much better in Chrome compared to Firefox!
I'm using Ubuntu 16.04
from codimd.
Related Issues (20)
- minio upload image use binary/octet-stream HOT 1
- Broken rendering of published note page HOT 2
- [Question] Disable 'Guest Mode' HOT 1
- Error during docker build HOT 1
- Next release date
- Cannot Rename Note HOT 5
- Everything Is Pasted Twice
- Lack of Security file
- Action list `Following` is too small
- Can't Upload images HOT 2
- Cannot build a Docker image on Apple Silicon
- Release 2.5.0 not available as docker image HOT 2
- Denial of Service in actionPandoc. HOT 2
- Docker image version 2.5.2 does not have CJK font HOT 1
- I'm also running into this issue. It appears there's no way to search notes by content?
- 双栏模式下编辑scroll bar会回到顶部
- accidentally created issue, delete this
- It seems like you're encountering an issue where the deployed server's webpage isn't loading, and you'd like to directly access the server to save the completed Markdown documents. HOT 14
- When export PDF it crash (version 2.5.3) HOT 3
- [security] The interface for uploading files does not require parameters and may be maliciously exploited
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codimd.