Hyperlinks not working at all

608 views
Skip to first unread message

Heleen

unread,
Sep 24, 2010, 10:13:02 AM9/24/10
to Pisa XHTML2PDF Support
Hello,

I am very user of xhtml2pdf, however I have one problem. Hyperlinks
just won't work in the generated PDF. The linked text get coloured
blue and underlined, but the text is not actually a link. I do not
have background image. I've tested the djangoproject demo from github
and added a hyperlink in there as well and that one doesn't work
either.

What I edited in the djangoproject demo is the template entries.html
(the extra <p> after the forloop):
{% extends "base.html" %}

{% block title %}{{title}}{% endblock %}

{% block content %}
{% for entry in blog_entries %}
<h2>{{ entry.id }} {{ entry.title|upper }}</h2>
<p style="margin-left:15px">{{ entry.body }}</p>
{% endfor %}
<p><a href="test.com">test</a></p>
{% endblock %}

{%block page_foot%}
Sample page {{block.super}}
{%endblock%}

I am using it in Django with Python 2.6, Reportlab 2.4, html5lib 0.9,
pisa 3.0.33, pyPdf 1.12, django 1.2.1, PIL 1.1.7. I'm running all this
on Ubuntu (10.04) using VirtualEnv.

Does anyone have a solution or is anyone having similar problems?
Thanks in advance!

David Bolton

unread,
Sep 24, 2010, 10:36:54 AM9/24/10
to xhtm...@googlegroups.com
When you say that hyperlinks are not working, are you referring to
external links to web pages or internal links within the document?

For internal links see:
http://groups.google.com/group/xhtml2pdf/browse_thread/thread/a39429db8c51089f/e48604517e28cb7d

David

Heleen

unread,
Sep 24, 2010, 10:41:30 AM9/24/10
to Pisa XHTML2PDF Support
Thanks for your reply David.
As you can see from the code I included I am talking about external
hyperlinks. So for example a link to http://www.google.com/.

On Sep 24, 4:36 pm, David Bolton <davidkbol...@gmail.com> wrote:
>   When you say that hyperlinks are not working, are you referring to
> external links to web pages or internal links within the document?
>
> For internal links see:http://groups.google.com/group/xhtml2pdf/browse_thread/thread/a39429d...

David Bolton

unread,
Sep 24, 2010, 11:31:41 AM9/24/10
to xhtm...@googlegroups.com
Sorry, I didn't see the tag the first time.

a href="test.com"

It looks like you are missing the http://

David

Heleen

unread,
Sep 28, 2010, 9:03:47 AM9/28/10
to Pisa XHTML2PDF Support
Thanks again for your reply David. I didn't think that adding http://
would matter, but apparently it does! It's all working now.

On Sep 24, 5:31 pm, David Bolton <davidkbol...@gmail.com> wrote:
>   Sorry, I didn't see the tag the first time.
>
> a href="test.com"
>
> It looks like you are missing the http://
>
> David
>
> On 9/24/2010 9:41 AM, Heleen wrote:
>
> > Thanks for your reply David.
> > As you can see from the code I included I am talking about external
> > hyperlinks. So for example a link tohttp://www.google.com/.
Reply all
Reply to author
Forward
0 new messages