#3427 closed defect (fixed)
Intra-wiki links treated as local OS links by Acrobat Reader
Reported by: | Owned by: | Diorgenes Felipe Grzesiuk | |
---|---|---|---|
Priority: | normal | Component: | TracWikiToPdfPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
When rendering a wiki page to PDF, links to other pages within the wiki (i.e. /myTrac/wiki/myWikiPage) are not reformatted in any way, causing Acrobat Reader to interpret those links as relative to the OS temporary folder of the user viewing the PDF (i.e. on Windows, C:\Users\Me\AppData\Local\Temp\myWikiPage).
Recommend reformatting intra-wiki links using absolute URLs (i.e. /myTrac/wiki/myWikiPage -> http://www.allMyTracs.com/myTrac/wiki/myWikiPage) so that Adobe Acrobat Reader correctly interprets the link.
Attachments (1)
Change History (10)
comment:1 Changed 16 years ago by
Status: | new → assigned |
---|
comment:2 follow-up: 3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 follow-up: 5 Changed 16 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I think you misunderstand: the no-links option determines whether links are included at all, not how they're formatted.
I had already erased no-links
because I wanted my PDF to include links. It was after erasing no-links
that I observed the bug.
Replying to diorgenes:
Hi, good morning!
This option is configurable. The trac.ini contains this option file. You can remove it or add other... These settings are parameters of HTMLDOC to generate PDF files.
Example:
[wikitopdf-admin] no-links = None /* erase */ linkstyle = plain [wikitopdf-page] no-links = None /* erase */ linkstyle = plain
Changed 16 years ago by
Attachment: | ticket3427wikiToPdf.png added |
---|
Illustrates how Acrobat Reader interprets intra-wiki links.
comment:5 follow-up: 6 Changed 16 years ago by
OK, sorry...
Here is running ... I tested in the windows and linux using IE and firefox with acrobat reader...
As you are making the Wiki links?
TracGuide [wiki:TracGuide]
Replying to object01@gmail.com:
I think you misunderstand: the no-links option determines whether links are included at all, not how they're formatted.
I had already erased
no-links
because I wanted my PDF to include links. It was after erasingno-links
that I observed the bug.Replying to diorgenes:
Hi, good morning!
This option is configurable. The trac.ini contains this option file. You can remove it or add other... These settings are parameters of HTMLDOC to generate PDF files.
Example:
[wikitopdf-admin] no-links = None /* erase */ linkstyle = plain [wikitopdf-page] no-links = None /* erase */ linkstyle = plain
comment:6 Changed 16 years ago by
I typically use [wiki:TracGuide a guide for Trac]
notation.
I wonder if this has to do with hosting Trac using the "multiple environments" mode, i.e. tracd -e
?
Consider the attached screenshot: that PDF was generated from a page having URL http://myCompany.com:8000/jupiter/wiki/sandbox
. The DEBUG log reveals:
2008-07-21 11:55:13,134 Trac[wikitopdf] DEBUG: WikitoPDF => Html code: '<p>\r\nDemonstrating an intra-wiki link problem with the WikiToPdf plugin.\r\n</p> \r\n<p>\r\n<a class="wiki" href="/jupiter/wiki/WikiStart">This link</a> links to the start page.\r\n</p>\r\n'
"jupiter" is the name of the Trac environment I was using at the time. We host multiple Trac environments (jupiter, saturn, earth, etc.) using tracd -e
off a single root:
D:\ourTracs D:\ourTracs\jupiter D:\ourTracs\saturn D:\ourTracs\earth
So, for example, we're hosting all Trac environments at once using tracd -e \ourTracs
.
Replying to diorgenes:
OK, sorry...
Here is running ... I tested in the windows and linux using IE and firefox with acrobat reader...
As you are making the Wiki links?
TracGuide [wiki:TracGuide]Replying to object01@gmail.com:
I think you misunderstand: the no-links option determines whether links are included at all, not how they're formatted.
I had already erased
no-links
because I wanted my PDF to include links. It was after erasingno-links
that I observed the bug.Replying to diorgenes:
Hi, good morning!
This option is configurable. The trac.ini contains this option file. You can remove it or add other... These settings are parameters of HTMLDOC to generate PDF files.
Example:
[wikitopdf-admin] no-links = None /* erase */ linkstyle = plain [wikitopdf-page] no-links = None /* erase */ linkstyle = plain
comment:7 follow-up: 8 Changed 16 years ago by
Looking at the PDF's bits, it appears that intra-wiki links are being encoded by HtmlDoc like so:
27 0 obj<</S/Launch/F(WikiStart)>>endobj
This causes Acrobat Reader to attempt to launch the file named "WikiStart", which of course doesn't exist on the user's machine.
That means that HtmlDoc is likely truncating the beginning of all relative URLs, eliminating all path information and leaving only the name of the page, i.e. /jupiter/wiki/WikiStart
-> WikiStart
.
I think that in Wiki2PdfPage "mode" (as opposed to Wiki2PdfAdmin "mode"), relative links should be expanded to fully-qualified URLs, i.e. /jupiter/wiki/WikiStart
-> http://myTracs.com/jupiter/wiki/WikiStart
, so that HtmlDoc encodes the link in the PDF like so:
27 0 obj<</S/URI/URI(http://myTracs.com/jupiter/wiki/WikiStart)>>endobj
comment:8 follow-up: 9 Changed 16 years ago by
I was opening the PDF directly without saving it.
I will provide these changes ...
Replying to object01@gmail.com:
Looking at the PDF's bits, it appears that intra-wiki links are being encoded by HtmlDoc like so:
27 0 obj<</S/Launch/F(WikiStart)>>endobjThis causes Acrobat Reader to attempt to launch the file named "WikiStart", which of course doesn't exist on the user's machine.
That means that HtmlDoc is likely truncating the beginning of all relative URLs, eliminating all path information and leaving only the name of the page, i.e.
/jupiter/wiki/WikiStart
->WikiStart
.I think that in Wiki2PdfPage "mode" (as opposed to Wiki2PdfAdmin "mode"), relative links should be expanded to fully-qualified URLs, i.e.
/jupiter/wiki/WikiStart
->http://myTracs.com/jupiter/wiki/WikiStart
, so that HtmlDoc encodes the link in the PDF like so:27 0 obj<</S/URI/URI(http://myTracs.com/jupiter/wiki/WikiStart)>>endobj
comment:9 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Trac Release: | 0.10 → 0.11 |
Replying to diorgenes:
I was opening the PDF directly without saving it.
I will provide these changes ...
Replying to object01@gmail.com:
Looking at the PDF's bits, it appears that intra-wiki links are being encoded by HtmlDoc like so:
27 0 obj<</S/Launch/F(WikiStart)>>endobjThis causes Acrobat Reader to attempt to launch the file named "WikiStart", which of course doesn't exist on the user's machine.
That means that HtmlDoc is likely truncating the beginning of all relative URLs, eliminating all path information and leaving only the name of the page, i.e.
/jupiter/wiki/WikiStart
->WikiStart
.I think that in Wiki2PdfPage "mode" (as opposed to Wiki2PdfAdmin "mode"), relative links should be expanded to fully-qualified URLs, i.e.
/jupiter/wiki/WikiStart
->http://myTracs.com/jupiter/wiki/WikiStart
, so that HtmlDoc encodes the link in the PDF like so:27 0 obj<</S/URI/URI(http://myTracs.com/jupiter/wiki/WikiStart)>>endobj
Hi
I added this functionality. Verify new version the plugin (2.2).
You are going to need more two parameters in trac.ini file.
[wikitopdf] # this are parameters functionality PDF links link = http://servername/trac-project folder_name = trac-project
Regards
Diorgenes F. Grzesiuk
Hi, good morning!
This option is configurable. The trac.ini contains this option file. You can remove it or add other... These settings are parameters of HTMLDOC to generate PDF files.
Example: