-
-
Notifications
You must be signed in to change notification settings - Fork 694
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
Support relative file URIs in hyperlinks when using CLI #532
Comments
Hmmm… Really looks like #437, I'll take a look. |
Unfortunately, what you want is currently impossible using the CLI:
Even if these 3 choices may look strange when looked at carefully, I think that they are actually really good when they're used without thinking (and that's what most CLI users do). I don't want to change this behavior. So you currently have to use A solution would be to transform |
@liZe That would be nice. Thank you 👍 |
It seems like this does not work anymore. I reference another PDF via |
It seems to work for me, when using both |
I see, providing the input via stdin is relevant for this. With this, the filepath indeed remains relative. However, style sheets are no longer found:
|
Of course, they’re not found because there’s no Handling your use case is not as easy as it looks. Even if we add a new option (something like If you want to get this feature, you can open a new issue so that we can discuss your use case and find a way to solve it in a quite flexible way. I can’t promise that it will be implemented, as the current behavior is already quite complex (even if it’s easy to use in easy cases, as explained above). |
Alright. This is currently not high on my priority list. When I come around to this, I might checkout the code and see whether I can come up with something that is viable. I'll open an issue / PR as necessary. Thank you for the information. |
For example when converting the following html to a pdf, it should be possible to make the hyperlink refer to the relative URI and not the absolute URI:
What I get: "file://absolute-path/external-file.pdf"
What I want: "external-file.pdf"
I have tried to change the --base-url argument, but it does not remove the absolute path if I set it to ""(empty).
So I looked it up in the code, and it is fairly easy to change, but I just wanted to make sure that there is interest in including this feature. If there are indeed interest I can make a pull request.
Relative file URIs are also what Prince outputs by default.
The text was updated successfully, but these errors were encountered: