Comments (12)
+1
May send a PR for this in the future
from markdown-pdf.
π Would love this as well
from markdown-pdf.
+1
from markdown-pdf.
+1
from markdown-pdf.
Why isn't it compatible at the moment? Shouldn't you be able to point to the github-markdown css file with the options.cssPath
?
options.cssPath
Type: String
Default value: [module path]/markdown-pdf/css/pdf.css
Path to custom CSS file, relative to the current directory.
Edit: I see the issue, you have to change the properties. I'll make a PR.
from markdown-pdf.
I made a pull-request to address this - #91.
from markdown-pdf.
Thanks @ckreon
from markdown-pdf.
@ckreon I got your PR modifications and added the options object like in your README.md but it's still not being styled.
from markdown-pdf.
@timarcosdias Can you show your config/script?
from markdown-pdf.
@ckreon I added pdf_ghm.css
to my markdown-pdf
installation and my code looks like:
var options = {
cssPath: 'C:/Users/Marcos/node_modules/markdown-pdf/css/pdf_ghm.css'
}
markdownpdf(options)
.concat
.from(mdDocs)
.to(bookPath, function () {
console.log("Created", bookPath)
})
I get no different result without the options
object.
from markdown-pdf.
@timarcosdias Try grabbing just the CSS file from my PR - and save it to your local drive. Use the current official release of MarkdownPDF and just use the options to point to that custom CSS file.
Here's part of my script file for you to reference, my CSS file is named _pdf_style.css
:
var ops = {
cssPath: '_assets/css/_pdf_style.css',
remarkable: {
xhtmlOut: true,
linkify: true
}
}
I use a relative path, as you can see, as opposed to an absolute path like you defined, though that shouldn't cause any issues as long as you are running it from your local environment.
from markdown-pdf.
@ckreon It still doesn't work. I worked it out with Gitbook + Calibre. I recommend it! Anyway, thank you for the support.
from markdown-pdf.
Related Issues (20)
- Doesn't work: `internal/validators.js:125` `TypeError [ERR_INVALID_ARG_TYPE]` HOT 6
- Doesn't seem to use system fonts on Big Sur
- break new page HOT 1
- How to get column-count working in css
- highlight.js 9.x is obsolete and leads to warnings when used HOT 2
- resize img works in github/gitlab but not in generated pdf
- Use markdown pdf for svelte files
- [feature] runningsPath alternative by using a function
- [derivative] Article with a step-by-step sample showcasing Markdown-pdf HOT 1
- How to use it in native js HOT 2
- code style and some css problems HOT 1
- Emoji's are not rendered HOT 1
- θͺε¨ει¨η½² buildηζΆεζε δΈζε HOT 2
- Markdown base url
- TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received null HOT 8
- Trying to render images
- Links rendered but text also includes URL
- Replace phantomjs for rendering
- The `phantomjs-prebuilt` is deprecated, so it's better another library. HOT 1
- output empty pdf file without error HOT 1
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 markdown-pdf.