Modify

Opened 6 years ago

Last modified 10 months ago

#3779 new defect

No PDF Export - Problem with template_path - probable reason found

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

Description (last modified by rjollos)

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)
  File "/usr/lib/python2.5/site-packages/TracWebAdmin-0.1.2dev_r5911-py2.5.egg/webadmin/web_ui.py", line 119, in process_request
    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: ''

Attachments (0)

Change History (8)

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

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

comment:3 Changed 6 years ago by anonymous

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

comment:4 follow-up: Changed 6 years ago by batt

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

comment:5 in reply to: ↑ 4 Changed 6 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 6 years ago by Achim.Spangler@…

  • Summary changed from No PDF Export - Problem with template_path to No PDF Export - Problem with template_path - probable reason found
  • Trac Release changed from 0.10 to 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 6 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 10 months ago by rjollos

  • Description modified (diff)

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.