Opened 10 years ago

Last modified 5 years ago

#3779 new defect

No PDF Export - Problem with template_path - probable reason found

Reported by: anonymous Owned by: Diorgenes Felipe Grzesiuk
Priority: normal Component: TracWikiToPdfPlugin
Severity: normal Keywords: internal error, template_path
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

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/", line 406, in dispatch_request
  File "/var/lib/python-support/python2.5/trac/web/", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/TracWebAdmin-0.1.2dev_r5911-py2.5.egg/webadmin/", line 119, in process_request
  File "build/bdist.linux-i686/egg/wikitopdf/", 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/", line 50, in process_wikitopdf
    titlefile = self.get_titlepage(title_template, title, subject, date, version)
  File "build/bdist.linux-i686/egg/wikitopdf/", line 133, in get_titlepage
    file_page = open(template_path, 'r')
IOError: [Errno 2] No such file or directory: ''

Attachments (0)

Change History (8)

comment:1 Changed 10 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 9 years ago by anonymous

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

comment:3 Changed 9 years ago by anonymous

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

comment:4 Changed 9 years ago by batt

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

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

Replying to batt:

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 9 years ago by Achim.Spangler@…

Summary: No PDF Export - Problem with template_pathNo PDF Export - Problem with template_path - probable reason found
Trac Release: 0.100.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/, wikitopdf/

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 9 years ago by Achim.Spangler@…

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

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 5 years ago by Ryan J Ollos

Description: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Diorgenes Felipe Grzesiuk.

Add Comment

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

Note: See TracTickets for help on using tickets.