-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
bug: Image rendering doesn't work with relative paths using ../ #70
Comments
Hi, you should be able to work around this with the
Let's say your file is
(relative paths should work fine as well) Can you give it a try please and let me know if it doesn't work? |
Thanks for the feedback! I'll try to use the However, looking to the available options it doesn't appear:
Maybe I'm using an old version and I should upgrade? In which version Thanks! |
Yup, you'll need to update to version 3: Edit: the fix to make these kinds of paths work has also been added in version 3, I doubt it's possible at all with version 2. |
Thanks for the feedback! I have upgraded my setup to md-to-pdf 3.0.0 with node v10. Now I have:
However, I get an ugly error when I try to use md-to-pdf, even in the simple case (without
I have checked the input file exists:
The placeholder for the output file also exists:
Maybe I'm doing something wrong? |
Sorry, that's because Node 10.0.0 is too low, you need at least 10.17 (or at least 11.14), because that's the minimum version to provide the |
I figured out how to set the engine field correctly and published a new version (3.0.1). I'll close this for now but if you're still having problems with relative paths, please feel free to re-open this issue! Thanks. |
After installing node 10.17.0 and getting familiar with the CLI of the 3.0.0 version, I finally solved the problem and now I'm able to render my documents without broken images. Thanks! Some additional feedback, in the case you want to take it into account:
|
Context:
md-to-pdf -v
): 2.8.2Describe the bug:
As far as I checked md-to-pdf is able to render images in resulting PDF correctly when the image in the markdown file doesn't use
../
. For instance if I have:It works.
However, if I have a relative path using
../
it doesn't work and I get the usual "broker image" thumb in the PDF:For instance:
This is how I call md-to-pdf (pathnames are not the actual ones, for the sake of simplicity, the important thing here is that I'm not using any parameter)
It is possible to use relative path with
../
? What I'm doing wrong in that case?(Sorry if this is not a bug but a known limitation or a bad usage on my side... I have looked at the documentation at https://github.com/simonhaenisch/md-to-pdf/blob/master/readme.md but I haven't found anything about this)
The text was updated successfully, but these errors were encountered: