-
-
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
Set absolute path for hyperlinks #437
Comments
Thanks for the good idea! It's now possible, without |
Is possible in the new version of weasyprint? I thinks it's quite useful for setting absolute path in the pdf when I copy the folder with pictures or other resources to another's machine. |
Yes, it is (with the current git version). |
Version 0.39 ------------ Released on 2017-06-24. Bug fixes: * Fix the use of WeasyPrint's URL fetcher with CairoSVG. Version 0.38 ------------ Released on 2017-06-16. Bug fixes: * `#477 <https://github.com/Kozea/WeasyPrint/issues/477>`_: Don't crash on font-face's src attributes with local functions. Version 0.37 ------------ Released on 2017-06-15. WeasyPrint now depends on tinycss2 instead of tinycss. New features: * `#437 <https://github.com/Kozea/WeasyPrint/issues/437>`_: Support local links in generated PDFs. Bug fixes: * `#412 <https://github.com/Kozea/WeasyPrint/issues/412>`_: Use a NullHandler log handler when WeasyPrint is used as a library. * `#417 <https://github.com/Kozea/WeasyPrint/issues/417>`_, `#472 <https://github.com/Kozea/WeasyPrint/issues/472>`_: Don't crash on some line breaks. * `#327 <https://github.com/Kozea/WeasyPrint/issues/327>`_: Don't crash with replaced elements with height set in percentages. * `#467 <https://github.com/Kozea/WeasyPrint/issues/467>`_: Remove incorrect line breaks. * `#446 <https://github.com/Kozea/WeasyPrint/pull/446>`_: Let the logging module do the string interpolation.
Is there any way to set absolute path for hyperlinks for weasyprint?
I try to use
HTML(string='<a href="html/images/poisson_chs.png">This is a link</a>', base_url='.').write_pdf('tmp.pdf')
, but the pdf is automatically changed to a absolute path. Even I setbase_url
inweasyprint.HTML
.Is it any way to keep the relative path in the html code?
The text was updated successfully, but these errors were encountered: