Modify

Opened 5 years ago

Last modified 14 months ago

#4043 new defect

Linked images in PDF don't work properly

Reported by: anonymous Owned by: diorgenes
Priority: high Component: TracWikiToPdfPlugin
Severity: major Keywords: image, link
Cc: Trac Release: 0.11

Description

In the PDF the links on images should be improved, with one enhancement and one defect-fix:

Enhancement

In the Wiki-output, the links point to the raw attachment (raw-attachment/wiki/[page name]/[image name]. In this case, it would be better to link to the "attachment page" in the wiki (attachment/wiki/[page name]/[image name]) so that the image is viewed in context and in the browser rather than having to be downloaded and saved or viewed with a local image editor.

Defect fix

Additionally, in single-page output, the links on images point to wiki/[image name] rather than attachment/wiki/[page name]/[image name] and so clicking on the image in the PDF gets a "describe [image name]" page rather than the image. This should behave as for wiki output (with the suggested enhancement!).

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by romainguinot@…

I have patched wikitopdf.py to fix embedded image and links in PDF files.
Unfortunately,

It seems i can't add it here :

Submission rejected as potential spam (Content contained these blacklisted patterns: '(?i)<a. href=')

If there is another way i can add it, let me know.
I could substitute all h.ref in the patch with hfakeref but it's not ideal.

comment:2 Changed 17 months ago by rjollos

#6182 closed as a duplicate.

comment:3 Changed 17 months ago by rjollos

#6966 closed as a duplicate.

comment:4 Changed 14 months ago by rjollos

(In [11471]) Refs #4043: Pass resource and id to the context, which seems to solve the issue that images require the realm and id to be specified (i.e. [[Image(wiki:WikiStart:myfile.png)]] worked, but [[Image(myfile.png)]] didn't.)

comment:5 Changed 14 months ago by rjollos

(In [11507]) Refs #4043, #6243:

  • Removed some needed imports in [11469].
  • When wiki page is created from the Admin panel, the page variables in not passed as a argument in the request. We'll have to find some other way to get it.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from diorgenes. Next status will be 'new'.
The owner will be changed from diorgenes to anonymous. Next status will be 'assigned'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.