Comments (5)
:) Sure. I will use it in a more scripted way very soon. If I think about ant improvement, I'll let you know.
Thanks!
from md-to-pdf.
The related code is here:
Lines 83 to 90 in b83e9f1
I don't have access to a Windows machine right now, I'll look into it when I get access to one. Anyway, I'm not sure why path.resolve()
would not work here... it's just supposed to take the relative path and make it absolute, relative to the current working directory.
Can you try running this in your directory and see if it works (i. e. prints your config), please:
node -e "console.log(require(path.resolve('generate-pdf\config.json')))"
Update: I just released 2.3.1
which allows to log any errors that occur while trying to read the config file, if you pass the --debug
argument. Can you please download the latest version and let me know what error it logs when running
md2pdf --debug --config-file generate-pdf\config.json doc1\doc1.md
The issue is not necessarily related to not being able to find/read the file, but e. g. could also be due to a syntax error within the file (maybe a trailing comma?).
from md-to-pdf.
Shame on me... I mistyped the folder (generate-pdf
instead of generate_pdf
.... dash/underscore issue).
In fact, it works like a charm!
I'm really sorry for the not-real-issue.... (the issue where between the chair and the keyboard...) :-/
from md-to-pdf.
No worries, glad you could figure it out 🤓 I haven't thoroughly tested all the different options myself and only on macOS, so I'm thankful for any feedback on potential issues. Gives me a chance to improve the code 😉
from md-to-pdf.
Hi
The relative path changed... it used to consider the relative path from the execution path, now, it considers relative path from the MD file.
It used to work with:
"stylesheet": [
".\\mystyle.css"
],
when executed from c:\RepoFolderRoot\
Error is:
md2pdf --config-file .\generate_pdf\config.json ./doc1/doc1.md
× generating PDF from ./doc1/doc1.md
→ ENOENT: no such file or directory, open 'c:\RepoFolderRoot\doc1\mystyle.css'
and now works with...
"stylesheet": [
"C:\\RepoFolderRoot\\generate_pdf\\mystyle.css"
],
It is not very convenient for me, as my stylesheet lifecyle is different from doc lifecycle, and I'm not the only one to use this repo (and of course, all of us do not have the same folder organisation....)
from md-to-pdf.
Related Issues (20)
- 'Bash wrote one or more lines to the standard error stream' on Azure Pipelines HOT 3
- bug: Failed to launch the browser process! HOT 1
- bug: HOT 1
- feature: Support for footnote, as Github-Flavored-Markdown now supports footnote HOT 1
- Improve documentation around Marked plugins
- feature: embedded tweets HOT 2
- feature: embedded instagram posts HOT 4
- feature: embedded mastodon posts HOT 2
- ProtocolTimeout change via the Commandline HOT 1
- bug: Puppeteer reports a weird warning HOT 5
- feature: Bookmarks HOT 1
- bug: Links to images now contain http://localhost:port prefix when using --as-html flag HOT 5
- feature: add --dest option to the CLI HOT 4
- bug: mathjax test is flaky
- feature: add language to body-tag HOT 3
- bug: HOT 1
- Can not find highlight style HOT 1
- feature: option to import other files for headerTemplate
- feature: ability to keep the browser window open (for testing & debugging) HOT 1
- bug: No such file or directory, open 'C:\workspace\angular-demo\pdf\**\*.md' HOT 3
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 md-to-pdf.