Skip to content
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

Closed
l0o0 opened this issue Mar 6, 2017 · 3 comments
Closed

Set absolute path for hyperlinks #437

l0o0 opened this issue Mar 6, 2017 · 3 comments
Labels
feature New feature that should be supported
Milestone

Comments

@l0o0
Copy link

l0o0 commented Mar 6, 2017

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 set base_url in weasyprint.HTML.
Is it any way to keep the relative path in the html code?

@liZe liZe closed this as completed in 1215cb5 Mar 25, 2017
@liZe liZe added this to the v0.37 milestone Mar 25, 2017
@liZe
Copy link
Member

liZe commented Mar 25, 2017

Thanks for the good idea! It's now possible, without base_url (base_url is being transformed to an absolute path, it's a useful feature).

@liZe liZe added the feature New feature that should be supported label Mar 25, 2017
@l0o0
Copy link
Author

l0o0 commented Apr 1, 2017

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.

@liZe
Copy link
Member

liZe commented Apr 1, 2017

Is possible in the new version of weasyprint?

Yes, it is (with the current git version).

netbsd-srcmastr referenced this issue in NetBSD/pkgsrc Aug 1, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported
Projects
None yet
Development

No branches or pull requests

2 participants