Opened 18 years ago

Last modified 15 years ago

#853 closed defect

pdf conversion misses images if wiki not on standard port — at Version 1

Reported by: anonymous Owned by: Alec Thomas
Priority: normal Component: PageToPdfPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.9

Description (last modified by Noah Kantrowitz)

PDF conversion was missing images because my web server running Trac is not on a standard port. When I changed the line that is supposed to correct the image links from:

 page = re.sub('<img src="(?!\w+://', '<img src="%s://%s' % (req.scheme, req.server_name), page)

to:

 page = re.sub('<img src="(?!\w+://', '<img src="%s://%s:%d' % (req.scheme, req.server_name, req.server_port), page)

Then it now works ok for me.

Thanks for a very useful plugin!

Change History (1)

comment:1 Changed 18 years ago by Noah Kantrowitz

Description: modified (diff)

Fixing formatting

Note: See TracTickets for help on using tickets.