Opened 9 years ago

No PDF Export - Problem with template_path - probable reason found

Reported by: Owned by: anonymous Diorgenes Felipe Grzesiuk normal TracWikiToPdfPlugin normal internal error, template_path 0.11

I get an internal error, when I want to use the TracWikiToPdfPlugin

Python Traceback

Traceback (most recent call last):
File "/var/lib/python-support/python2.5/trac/web/main.py", line 406, in dispatch_request
dispatcher.dispatch(req)
File "/var/lib/python-support/python2.5/trac/web/main.py", line 237, in dispatch
resp = chosen_handler.process_request(req)
path_info)
File "build/bdist.linux-i686/egg/wikitopdf/web_ui.py", line 61, in process_admin_request
return formats[format]['provider'].process_wikitopdf(req, format, title, subject, rightpages, date, version, rightpages[0])
File "build/bdist.linux-i686/egg/wikitopdf/formats.py", line 50, in process_wikitopdf
titlefile = self.get_titlepage(title_template, title, subject, date, version)
File "build/bdist.linux-i686/egg/wikitopdf/formats.py", line 133, in get_titlepage
file_page = open(template_path, 'r')
IOError: [Errno 2] No such file or directory: ''


comment:1 Changed 9 years ago by A.Spangler@…

How should I create, name and install a suitable template file for TracWikiToPdfPlugin ?? I think, that this file is missing, so that no PDF export works.

comment:2 Changed 8 years ago by anonymous

I am getting the same problem.. has anybody got this plugin working?

comment:3 Changed 8 years ago by anonymous

I also have this problem. Any solution likely or alternative strategy?

comment:4 follow-up:  5 Changed 8 years ago by batt

Same problem here, is this plugin working or is it broken?

comment:5 in reply to:  4 Changed 8 years ago by anonymous

Same problem here, is this plugin working or is it broken?

I recommended use version 0.11 (Trac) and 2.2.2 (plugin)

comment:6 Changed 8 years ago by Achim.Spangler@…

Summary: No PDF Export - Problem with template_path → No PDF Export - Problem with template_path - probable reason found 0.10 → 0.11

Hi, I got it working after several tries.

I think most important changes were:

• delete argument "template_path" with "del htmldoc_args['template_path' " around line 68 before defining "args_string" --> this parameter is no more accepted by htmldoc
• (( maybe no more needed )) override codepage from derived codepage to 'iso-8859-15' (wikitopdf/formats.py, wikitopdf/wikitopdf.py)

I will try to optimize the htmldoc call parameters to optimize table layout - cutting off of some columns. The htmldoc website lists the parameter "--browserwidth pixels" to control the width of browser window. This should be defined corresponding to page size and resolution. The documentation of htmldoc refers to this parameter in case of table column cut-off.

I did my changes against version 4224 from subversion repo. I do not know whether this is part of plugin version 2.2.2.

My htmldoc version is 1.8.27 (ubuntu/hardy).

Another remaining problem: I get to table of content. Maybe this is planned to work only for PDF Export for group of WIKI pages?

Hope it helps, Achim

comment:7 Changed 8 years ago by Achim.Spangler@…

Hi, forgot to name the file, where the change is needed: Change "wikitopdf/wikitopdf.py".

I have no clean diff, as I tried also the somewhere posted patch for better image handling - which works fine.

Bye, Achim

comment:8 Changed 3 years ago by Ryan J Ollos

Description: modified (diff)

Modify Ticket

Change Properties