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
Links in combined PDFs are still broken #43
Comments
On my part, trying out the I still get 👍 for the appreciation of the whole project |
Yes please provide an example, my project here doesn't reproduce this issue. Thank you! |
Here's the test project I'm using. I was curious if it was a Windows issue so opened the project on a Linux/Ubuntu desktop but am seeing the same behavior; PDFs are created successfully but links are pointing to local files instead of locations within the PDF. I also get errors for each head tag in the project, as above (this one is slightly different than my original report because I re-created everything from scratch).
Other details that may be useful:
Project: Generated PDF: Verbose build output (or most of it anyway, it filled up my buffer so we're missing the beginning) Thanks again for looking into it! |
I found the issue. For the time being, Need to write a separate href builder for directory urls. |
Sorry to drop this, was away for a couple of weeks! This workaround fixes one problem -- I no longer get pointed at local files -- but it looks like there was another issue hiding behind that one. Now that the local file links are fixed (or worked around), some links work, but some links just render as styled text that doesn't go anywhere.
I've expanded my test project to show these individual cases. If I can add test cases that would be helpful for you, I'm happy to build it out further. Also if this looks like a totally different issue to you, we can close this off and start a new one. Revised test project: pdf-link-test-project.zip Rendered PDF: test.pdf Build output (not verbose this time because whoa): output.txt |
@erilot try updating to v0.5.5, that should fix those issues. |
Not only broken, but unclickable. |
Is there any work planned for supporting directory urls? Please let me know how we can help on getting this awesome feature in :)
I'm also experiencing the same with the latest version 0.5.5. Is there any setting we have to put in place to make this work? |
@zhaoterryy @erilot any news on this ? I'm still having issues with links containing anchors and several |
@CaptainQuirk sorry, forgot to watch my notifications. I cobbled together a solution for this (actually completely rebuilt the path generator) and it works for our team, but I wasn't able to submit a PR here and then forgot about it. I've forked this project and updated it with my code, you're welcome to use it (the fork is not registered with pypi so you can't use pip to install it, you'll need to install it manually or copy the plugin files over this install. https://github.com/erilot/mkdocs-pdf-export-plugin @zhaoterryy I would be happy to submit this as a PR here but i think you have to allow that. |
@erilot You should be able to submit a PR, I've accepted other's before. If you're still unable to then I can manually create one myself from your repo. Thanks!! |
@zhaoterryy you're totally right, I don't know what I did wrong before. PR is here: #64 |
FYI, I created docker mkdocs framework which uses this plugin among other things. You can view generated demo output here: and download pdf You can see that first links aren't clickable but later on second page so called magic links are clickable. See requirements for dependency details. |
Thanks, it solved my problem today! |
ANy news ? I used the use_directory_urls to false, but the error is always here for subdirectory link.... |
The PR seems stuck... I also still get this kind of problems (anchor used in file in subfolder), too tired to try out why the patch has a conflict :( |
Running mkdocs-pdf-export-plugin 0.5.3, relative links between pages are still pointing to local file locations:
It looks like this was fixed in #28 but may have regressed since then. I've tested this in my existing projects and in a clean test project (as shown in the screenshot above, relative links are all pointing to
file:///C:...
locations. The links work properly in rendered HTML.During the build, the same error gets thrown four times (the test project has only 3 pages), which seems like the same thing experienced in #42:
There is no file called pdf-export-test in the test project, but that is the H1 on the index.md page.
I'd be happy to provide the test project if it would be helpful. I could take a stab at a PR but I'm still learning my way around the code (and know nothing about WeasyPrint, unfortunately).
And lastly, this project is a lifesaver! Thank you so much for your work and active support. It is greatly appreciated.
The text was updated successfully, but these errors were encountered: