realdennis / md2pdf Goto Github PK
View Code? Open in Web Editor NEWOffline markdown to pdf, choose -> edit -> transform 🥂
Home Page: https://md2pdf.netlify.com/
License: MIT License
Offline markdown to pdf, choose -> edit -> transform 🥂
Home Page: https://md2pdf.netlify.com/
License: MIT License
As title, not support firefox (im using firefox 65.0.1)
the function bar was not show.
Great project - is there a simple summary of the fonts and formatting you are using for the pdf output?
This is my first time ever creating an issue on someone else's repo, so I apologize if this is bad form.
I would like to use this service in an API related capacity to send markdown content and print options over a POST request that returns the pdf, is this a possible feature or something that I would be able to collaborate on in the future?
At least render testing or snapshot testing would be good, help wanted.
This has a typo. It should be "Markdown".
Is it possible to make it able to use local images/svg-files?
![Screendump](Screendump.png)
Hi,
good work!
Any chance to have a command line utility?
Cheers
Olivier
For instance:
I want the former to be displayed in the PDF, not the unrendered code for math expressions.
Thank you in advance :-)
So far when we want to find and do some update for component such as the previewer, we need to access src/App/Components/Markdown/Previewer/Preview.js
let's flat the structure.
And also initial state (initialText.js) is in really nested folder, feel wordy src/App/Container/Hooks/InitialText.js
Create a thread to discuss about it, currently we don't have the action items, please don't just send the PR.
When converting the markdown file with a table of contents (example below), the links in the converted pdf file do not work.
Instead of the respective header in the pdf file itself, the link in the pdf file points to the app's page (i.e. https://md2pdf.netlify.app/#hello
).
<!-- example table of contents -->
- [Hello](#hello)
- [md2pdf](#md2pdf)
- [Thank you](#thank-you)
I was wondering if this is something that can be fixed.
Also, thank you so much for the app, it's very useful. 🙌
Supplying the following Code on https://md2pdf.netlify.app/ results in JS execution
### XSS PoC
<!-- markdownlint-disable MD038-->
- `<Img src = x onerror = "javascript: window.onerror = alert(document.domain); throw XSS">`
I was using md2pdf as a Markdown editor today and I forgot to back-up my work. Clicking on a link by accident resulted in a loss of progress. Would it be possible to add client-side caching to the app so that if a user goes out and comes back to md2pdf, the last-cached content is restored?
whether a ---/*** in markdown or
Thank you for this very nice service!
Here's a "nice to have" suggestion:
Use case: I already wrote an .md file in my favorite Editor (nvim) and now want to turn it into a PDF.
I find your service on the internet, use it, but when I transform my document the file name is set to md2pdf - Markdown to PDF.pdf
because that's (still) the <title>
of the web app.
It does so every time - it doesn't even remember the name when Transform multiple times.
Maybe it's easy to suggest a filename, maybe like so.
You could get the filename from the chosen uploaded file, and make that override some other sane default, like choosing the biggest headline title (# h1 head line badumm tuss!
) as file name.
It would be even nicer if it remembered the file name I chose the last time, but I don't know if that is easy to do.
Doesn't generate a Table of Contents from titles, subtitles, etc.
Thanks for the great project!
md2pdf/src/App/Components/Header/Upload.js
Lines 2 to 6 in 9bfa0e4
md2pdf/src/App/Components/Markdown/index.js
Lines 11 to 23 in 9bfa0e4
Prefer use the native event with useEffect
instead of experimental & unstable library (will increase the learning cost to other new contributor)
while,
thank you for your job.
there a question.
how can i add images to the markdown files?
Look forward to your favourable reply,ths a lot.
Choese Button FAIL
https://github.com/realdennis/md2pdf/blob/master/src/index.js#L9-L17
^ apparently it's a hack, I thought we can done these in here with clean up
The readme says there is an offline web app, but I can't find it :(
I use <a>
tags around a <figure>
tag with an <img>
and a <figcaption>
like this:
<a href="https://i.imgur.com/S17rFny.jpg">
<figure class="image">
<img src="https://i.imgur.com/S17rFny.jpg">
<figcaption style="color:gray; text-align:center;">An image</figcaption>
</figure>
</a>
I do this so if the reader of the PDF clicks on the image, it opens in a browser window (to view full size). This behavior works in the preview, but not in the exported pdf.
Feature requests
To reproduce, paste the following:
Here is a footnote reference[^1]
[^1]: here's the footnote :)
then export to PDF and click on any of the footnote hyperlinks. expected behavior is it links to the footnote (or back to the reference) but instead it links to something like https://md2pdf.netlify.app/#fnref2
can we have a support for latex math equations? Like the pandoc markdown
It's nice that I could in principle run your code offline, but I only need a quick conversion of my markdown doc to a PDF without installing anything anywhere.
As it stands, this app is hosted by Netlify, and I don't know or have any reason to trust Netlify (or you). (not meaning to be rude)
I would find the online version of this much more trustworthy if it was a static github.io page.
That way, cool hackers that write everything in markdown instantly know you won't collect their data on your server - because (hopefully) you can't. Probably that's not even true, haven't looked into GH pages for a long while, and you always could come up with some way to collect your users' data. But it would make it harder.
Make it extra hard to collect data, even for people who use this software on their own servers. Do set CORS and whatever you can so people have to explicitly disable that if they want to run an instance that does collect data.
While you're at it, also remove that shitty Google Analytics, it smells like vanity and puts an otherwise cool tool to shame. Metadata is data too.
Unit testing or integration testing
Now, the app would not use localstorage to save state (editor text), so need to remove something about persist state file/dependency/hook .
Line 15 in bb3c56e
It will bring more convenience to users, use this app in another way.
I used the simple markdown link format to add a link
[write your text](write the link)
It worked in the preview format, but when I exported it into a PDF file, all the links vanished, and none of them worked.
Suggestion: Printing a PDF file removes the link(s) attached to the PDF file. Rather saving the PDF file preserves the link. So if you put an option for saving rather than printing then I guess all the links will work perfectly as we get in the preview.
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.