﻿ticket,summary,type,release,owner,status,created,modified,_description,_reporter
14163,KeyError: 'tracpdf/htdocs' raised,defect,1.4,Cinc-th,new,2022-10-20T04:24:01+02:00,2022-10-20T04:24:01+02:00,"This plugin uses `tracpdf/htdocs` resource and a css file in the htdocs directory, however the css file is not installed. As the result, the following exception is raised:

{{{
Traceback (most recent call last):
 File ""/usr/lib/python3.10/site-packages/Trac-1.5.4.dev0-py3.10.egg/trac/web/main.py"", line 610, in dispatch_request
   dispatcher.dispatch(req)
 File ""/usr/lib/python3.10/site-packages/Trac-1.5.4.dev0-py3.10.egg/trac/web/main.py"", line 302, in dispatch
   raise e
 File ""/usr/lib/python3.10/site-packages/Trac-1.5.4.dev0-py3.10.egg/trac/web/main.py"", line 248, in dispatch
   resp = chosen_handler.process_request(req)
 File ""/usr/lib/python3.10/site-packages/Trac-1.5.4.dev0-py3.10.egg/trac/web/chrome.py"", line 718, in process_request
   in provider.get_htdocs_dirs() or []
 File ""/usr/lib/python3.10/site-packages/TracWikiPrint-4.0.0.dev0-py3.10.egg/tracpdf/admin.py"", line 153, in get_htdocs_dirs
   return [('wikiprint', resource_filename(__name__, 'htdocs'))]
 File ""/usr/lib/python3.10/site-packages/pkg_resources/__init__.py"", line 1154, in resource_filename
   return get_provider(package_or_requirement).get_resource_filename(
 File ""/usr/lib/python3.10/site-packages/pkg_resources/__init__.py"", line 1763, in get_resource_filename
   return self._extract_resource(manager, zip_path)
 File ""/usr/lib/python3.10/site-packages/pkg_resources/__init__.py"", line 1785, in _extract_resource
   timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
KeyError: 'tracpdf/htdocs'
}}}

{{{
$ python setup.py bdist_egg
$ unzip -l dist/*.egg
Archive:  dist/TracWikiPrint-4.0.0.dev0-py2.7.egg
  Length      Date    Time    Name
---------  ---------- -----   ----
     7649  2022-10-20 11:17   EGG-INFO/PKG-INFO
      480  2022-10-20 11:17   EGG-INFO/SOURCES.txt
        1  2022-10-20 11:17   EGG-INFO/dependency_links.txt
      118  2022-10-20 11:17   EGG-INFO/entry_points.txt
       12  2022-10-20 11:17   EGG-INFO/requires.txt
        8  2022-10-20 11:17   EGG-INFO/top_level.txt
        1  2022-10-20 11:17   EGG-INFO/zip-safe
     1606  2022-10-18 20:19   tracpdf/__init__.py
      334  2022-10-20 11:17   tracpdf/__init__.pyc
     7470  2022-10-18 20:19   tracpdf/admin.py
     5967  2022-10-20 11:17   tracpdf/admin.pyc
     4791  2022-10-18 20:19   tracpdf/pdfbook.py
     3893  2022-10-20 11:17   tracpdf/pdfbook.pyc
     2626  2022-10-18 20:19   tracpdf/util.py
     1589  2022-10-20 11:17   tracpdf/util.pyc
    16552  2022-10-20 11:17   tracpdf/wikiprint.py
    12949  2022-10-20 11:17   tracpdf/wikiprint.pyc
     3438  2022-10-18 20:19   tracpdf/templates/wikiprint_admin_parameters.html
     4852  2022-10-18 20:19   tracpdf/templates/wikiprint_parameters.html
---------                     -------
    74336                     19 files
}}}

Fix for the issue:

{{{#!diff
Index: setup.py
===================================================================
--- setup.py    (revision 18497)
+++ setup.py    (working copy)
@@ -33,8 +33,7 @@
     version='4.0.0',
     packages=['tracpdf'],
     package_data={
-        'tracpdf': ['templates/*.html'
-        ]
+        'tracpdf': ['templates/*.html', 'htdocs/css/*.css'],
     },
     install_requires=['pdfkit', 'trac'],
     author='Cinc-th',
}}}",Jun Omae
14087,Missing 'trac_auth' cookie in request,defect,1.4,Cinc-th,new,2021-12-02T00:08:49+01:00,2022-10-18T13:45:36+02:00,"After installing the plugin, trying to print a wiki page results in a KeyError: 'trac_auth'.


{{{
Systeminformation:

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
Paket	Version
Trac 	1.4.1
Babel 	2.8.0
Docutils 	0.16
Genshi 	0.7.3 (with speedups)
Jinja2 	2.11.2
mod_python 	3.3.1
MySQL 	server: ""5.7.21-1ubuntu1"", client: ""0.9.3"", thread-safe: True
Pygments 	2.5.2
pymysql 	0.9.3
Python 	2.7.18 (default, Mar 8 2021, 13:02:45) [GCC 9.3.0]
pytz 	2020.1
setuptools 	44.1.0
Subversion 	1.13.0 (r1867053)
Textile 	3.0.4
jQuery	1.12.4
jQuery UI	1.12.1
jQuery Timepicker	1.6.3
Installierte Plugins
Name 	Version 	Ort
TracCsvPlugin 	0.0.1 	/usr/local/lib/python2.7/dist-packages/TracCsvPlugin-0.0.1-py2.7.egg
TracDragDrop 	0.12.0.15 	/usr/local/lib/python2.7/dist-packages/TracDragDrop-0.12.0.15-py2.7.egg
TracNav 	4.1 	/usr/local/lib/python2.7/dist-packages
TracPdfPreview 	0.1.2 	/usr/local/lib/python2.7/dist-packages
TracPlantUml 	2.3 	/usr/local/lib/python2.7/dist-packages
TracTags 	0.12.dev0 	/usr/local/lib/python2.7/dist-packages
TracWikiAutoComplete 	1.4 	/usr/local/lib/python2.7/dist-packages/TracWikiAutoComplete-1.4-py2.7.egg
TracWikiExtras 	1.3.1 	/usr/local/lib/python2.7/dist-packages
TracWikiPrint 	4.0.0.dev0 	/usr/local/lib/python2.7/dist-packages/TracWikiPrint-4.0.0.dev0-py2.7.egg
TracXMLRPC 	1.1.9.dev0 	/usr/local/lib/python2.7/dist-packages
}}}",thekk@…
12948,Replace xhtml2pdf dependency with WeasyPrint,task,,,new,2016-11-14T16:58:26+01:00,2021-05-16T21:08:28+02:00,"The following was sent to me by a Debian packager:

The pisa Homepage (xhtml2pdf.com) redirects to sejda.com, the open
source backend of that is at sejda.org but is now written in java.

The pisa PyPi page says it is replaced by xhtml2pdf. It looks like this
is a rename of the pisa codebase.

https://pypi.python.org/pypi/pisa/

The xhtml2pdf PyPi page says that it is !abandoned/dead and to use
WeasyPrint instead.

https://pypi.python.org/pypi/xhtml2pdf

That said, there are still some recentish commits:

https://github.com/xhtml2pdf/xhtml2pdf/commits/master

It might be a good idea to add support for WeasyPrint to
TracWikiPrintPlugin as it has had more recent commits:

http://weasyprint.org/
https://github.com/Kozea/WeasyPrint
https://github.com/Kozea/WeasyPrint/commits/master",Ryan J Ollos
12862,Plugin ignores image alignment,defect,,,new,2016-09-01T12:10:51+02:00,2019-08-11T22:36:59+02:00,Images aligned center or right on wiki page are shifted to left edge of the created PDF page.,anonymous
11427,Plugin does not load on fedora,defect,0.12,,new,2013-12-03T22:52:04+01:00,2019-08-11T22:36:59+02:00,"I am running Fedora 17 right now (I know that this is an old distribution) and when I install the wikiprint plugin I get the error-log messages:
{{{
DEBUG: Loading wikiprint.wikiprint from /usr/lib/python2.7/site-packages
DEBUG: Skipping ""wikiprint.formats = wikiprint.formats"": (""DistributionNotFound: pisa"" not found)
DEBUG: Loading wikiprint.wikiprint from /usr/lib/python2.7/site-packages
DEBUG: Skipping ""wikiprint.web_ui = wikiprint.web_ui"": (""DistributionNotFound: pisa"" not found)
DEBUG: Loading wikiprint.wikiprint from /usr/lib/python2.7/site-packages
DEBUG: Skipping ""wikiprint.wikiprint = wikiprint.wikiprint"": (""DistributionNotFound: pisa"" not found)
}}}
and the plugin is missing from the project plugin listing.

I have installed all of the required packages, and also searched on this error message with no other examples of a similar failure found.",Brian Sipos
10933,HTML: link substitution/export as an archive,enhancement,,,new,2013-03-13T12:33:56+01:00,2020-08-12T19:55:05+02:00,"Hello, the ""Printable HTML"" export does not work well for me, as all images and other links get resolved to localhost (and the web browser is not located on the TRAC server).

Would it be possible to retain the original server links (rebase_links does not seem to affect this) OR at least export the Wiki page complete with any images?",hopfrog@…
10091,WIKIPRINT_BOOK permission for users breaks PrivateWiki security,defect,0.12,,new,2012-06-13T17:57:43+02:00,2019-08-11T22:36:59+02:00,"When WIKIPRINT_BOOK permission is granted to users, PRIVATE_VIEW permissions installed by the PrivateWikiPlugin are not respected. So a normally unprivileged user can read private Wiki contents by adding the respective pages to a Wiki Book.

Suggested Solution: Filter for PRIVATE_VIEW_<username>-Permissions when building the Wikibook selects, leaving out all pages to which the current user does not have view permission.",memartin
9854,"Download the images and fonts locally, instead of using the web browser",enhancement,0.12,,new,2012-02-25T20:06:39+01:00,2019-12-15T06:01:00+01:00,"I've changed some code in the wikiprint.py in order to enable the local access to the images, fonts and other ressources instead of downloading them via webserver. This can be usefull if you are using IIS on Windows, or you have SSON authentication enabled...

It's a draft, I don't have the time to submit it to SVN, but I hope, someone will take care of it :)

== Code ==
{{{
    def getFileName(self, name, relative=''):
        try:
            self.env.log.debug('WikiPrint.linkLoader => Orignal name: %s' % name)     
            if name.startswith('http://') or name.startswith('https://'):
                self.env.log.debug('WikiPrint.linkLoader => Resolving URL: %s' % name)
                url = urlparse.urljoin(relative, name)
                rawpost = url.find('/raw-attachment/')
                if rawpost > -1:
                   if self.env.config.get('wikiprint', 'raw_attachment_path'):
                      raw_attachment_path = self.env.config.get('wikiprint', 'raw_attachment_path')
                      self.env.log.debug('WikiPrint.linkLoader => raw_attachment_path will be applied')
                      name = url[rawpost+16:]
                      self.env.log.debug('WikiPrint.linkLoader => Stripped name: %s' % name)
                      name1=os.path.join(raw_attachment_path, name)
                      self.env.log.debug('WikiPrint.linkLoader => Changed name: %s' % name1)
                      inj_control=name1.find(raw_attachment_path)
                      if inj_control == 0:
                         return name1
                      else:
                         self.env.log.error('WikiPrint.linkLoader => Injection found!' % name1)
                         return ''
                
                self.env.log.debug('WikiPrint.linkLoader => urljoined URL: %s' % url)
            elif self.allow_local:
                self.req.perm.assert_permission('WIKIPRINT_FILESYSTEM')
                self.env.log.debug(""WikiPrint.linkLoader => Resolve local filesystem %s"", name)
                return name
            else:
                #Relative path
                if self.env.config.get('wikiprint', 'relative_path'):
                     self.env.log.debug(""WikiPrint.linkLoader => Using path %s "",self.env.config.get('wikiprint', 'relative_path'))
                     url = os.path.join(self.env.config.get('wikiprint', 'relative_path'), name)
                     self.env.log.debug(""WikiPrint.linkLoader => Substituing relative path %s to %s"", name, url)
                     return url
                else: 
                     self.env.log.debug(""WikiPrint.linkLoader => Relative path %s to %s"", name, urlparse.urljoin(self.req.abs_href(), name))
                     url = urlparse.urljoin(self.req.abs_href(), name)
                
            path = urlparse.urlsplit(url)[2]
}}}

== Usage ==

Add following rows in to [wikiprint] section of trac.ini :
{{{
raw_attachment_path = D:\Support\Projects\ABC\attachments\
relative_path = D:\FontStorage\
}}}

The raw_attachment_path is the path to wiki and ticket attachments in the trac project directory

relative_path is the path to ressource storage... (like fonts used in css etc..)",ajo
9816,TracMathJaxPlugin compatibility (Latex rendering),enhancement,0.12,,new,2012-02-16T06:55:34+01:00,2019-08-11T22:36:59+02:00,"Pages that use Latex processor TracMathJaxPlugin are not rendered correctly when exported to PDF or printable HTML.

For example, a Trac page containing a Latex directive:
{{{
{{{
#!Latex
 Cor = \frac{\sigma(V_1,V_2)}{\sqrt{\sigma(V_1,V_1) \, \sigma(V_2,V_2)}}
}}}
}}}
when exported using TracWikiPrintPlugin will render the formula as:
{{{
\[ Cor = \frac{\sigma(V_1,V_2)}{\sqrt{\sigma(V_1,V_1) \, \sigma(V_2,V_2)}}$ \]
}}}
The formula is rendered correctly by TracMathJaxPlugin in the Trac page itself.

Trac 0.12[[BR]]
TracWikiPrintPlugin 1.9.2[[BR]]
TracMathJaxPlugin 0.2 (patched with the attachment from ticket [ticket:8758])[[BR]]
[http://www.mathjax.org/ MathJax] 1.1",Sebuz
9801,"No handlers could be found for logger ""ho.pisa""",defect,0.12,,new,2012-02-15T06:35:17+01:00,2019-08-11T22:36:59+02:00,"Trac log handler is not passed to Pisa resulting in error messages (Apache error log):
{{{
No handlers could be found for logger ""ho.pisa""
}}}

TracWikiPrintPlugin 1.9.2[[BR]]
pisa 3.0.33[[BR]]
Trac 0.12
----
Possible fix that worked for me:

Pass the log handler to Pisa before line 260 in [source:tracwikiprintplugin/0.11/wikiprint/wikiprint.py#10686 wikiprint.py]:
{{{
#!python
 pisa.log.addHandler(self.env._log_handler)
 pdf = pisa.CreatePDF(page, pdf_file, show_errors_as_pdf = True, default_css = css_data, link_callback = loader.getFileName)
 out = pdf_file.getvalue()
 pdf_file.close()
 pisa.log.removeHandler(self.env._log_handler)
}}}

Remove handler when done.



",Sebuz
9777,Kerberos support,defect,0.12,,new,2012-02-08T13:04:45+01:00,2019-08-11T22:36:59+02:00,"Are you planning on supporting Kerberos for authenticating the server itself? Or perhaps using httpauth_user and httpauth_password to send, well, the username and password for the user to kerberos (since mod_auth_kerb will accept them instead of just tickets)?",raubvogel@…
9513,No way to hide content from printing in WikiPrint?,defect,0.12,,new,2011-11-02T18:14:36+01:00,2019-08-11T22:36:59+02:00,After checking the available documentation I find no way to write a block/table/... that gets displayed on screen but not printed.,anonymous
8916,ZeroDivisionError: float division (can't install with easy_install),defect,0.11,Ryan J Ollos,new,2011-06-22T11:27:10+02:00,2013-03-20T00:26:57+01:00,"
Hi.. I'm a newbie.. I got this error if i select multiple pages into pdf book or article.  
Can you help me? Thanks alot.


{{{
Oops…
Trac detected an internal error:

ZeroDivisionError: float division

}}}


-------------------------------------------------------------------------------------------------

{{{
Python Traceback
Most recent call last:

    * File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/main.py"", line 511, in _dispatch_request
      Code fragment:
      Line	
      506	try:
      507	if not env and env_error:
      508	raise HTTPInternalError(env_error)
      509	try:
      510	dispatcher = RequestDispatcher(env)
      511	dispatcher.dispatch(req)
      512	except RequestDone:
      513	pass
      514	resp = req._response or []
      515	 
      516	except HTTPException, e:
      Local variables:
      Name	Value
      dispatcher 	<trac.web.main.RequestDispatcher object at 0x9789f0c>
      e 	ZeroDivisionError('float division',)
      env 	<trac.env.Environment object at 0x9410a0c>
      env_error 	None
      req 	<Request ""POST '/admin/wikiprint/makebook'"">
      resp 	[]
    * File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/main.py"", line 237, in dispatch
      Code fragment:
      Line	
      232	msg = _('Do you have cookies enabled?')
      233	raise HTTPBadRequest(_('Missing or invalid form token.'
      234	' %(msg)s', msg=msg))
      235	 
      236	# Process the request and render the template
      237	resp = chosen_handler.process_request(req)
      238	if resp:
      239	if len(resp) == 2: # Clearsilver
      240	chrome.populate_hdf(req)
      241	template, content_type = \
      242	self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.admin.web_ui.AdminModule object at 0x9789dcc>
      chrome 	<trac.web.chrome.Chrome object at 0x96c410c>
      ctype 	'application/x-www-form-urlencoded'
      err 	(<type 'exceptions.ZeroDivisionError'>, ZeroDivisionError('float ...
      handler 	<trac.admin.web_ui.AdminModule object at 0x9789dcc>
      options 	{}
      req 	<Request ""POST '/admin/wikiprint/makebook'"">
      self 	<trac.web.main.RequestDispatcher object at 0x9789f0c>
    * File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/admin/web_ui.py"", line 116, in process_request
      Code fragment:
      Line	
      111	if not provider:
      112	raise HTTPNotFound(_('Unknown administration panel'))
      113	 
      114	if hasattr(provider, 'render_admin_panel'):
      115	template, data = provider.render_admin_panel(req, cat_id, panel_id,
      116	path_info)
      117	 
      118	else: # support for legacy WebAdmin panels
      119	data = {}
      120	cstmpl, ct = provider.process_admin_request(req, cat_id, panel_id,
      121	path_info)
      Local variables:
      Name	Value
      _panel_order 	<function _panel_order at 0xa3cc95c>
      cat_id 	u'wikiprint'
      panel_id 	u'makebook'
      panels 	[('general', 'General', 'basics', 'Basic Settings'), ('general', ...
      path_info 	None
      provider 	<wikiprint.web_ui.WikiPrintAdmin object at 0x9743b8c>
      providers 	{('tracini', 'inherit'): <iniadmin.iniadmin.IniAdminPlugin object at ...
      req 	<Request ""POST '/admin/wikiprint/makebook'"">
      self 	<trac.admin.web_ui.AdminModule object at 0x9789dcc>
    * File ""/usr/local/lib/python2.6/dist-packages/TracWikiPrintPlugin-1.8.4-py2.6.egg/wikiprint/web_ui.py"", line 53, in render_admin_panel
      Code fragment:
      Line	
      48	 
      49	# IAdminPanelProvider methods
      50	def render_admin_panel(self, req, cat, page, component):
      51	
      52	if page == 'makebook':
      53	return self._render_book(req, cat, page, component)
      54	if page == 'options':
      55	return self._render_options(req, cat, page, component)
      56	
      57	
      58	def _render_book(self, req, cat, page, component):
      Local variables:
      Name	Value
      cat 	u'wikiprint'
      component 	None
      page 	u'makebook'
      req 	<Request ""POST '/admin/wikiprint/makebook'"">
      self 	<wikiprint.web_ui.WikiPrintAdmin object at 0x9743b8c>
    * File ""/usr/local/lib/python2.6/dist-packages/TracWikiPrintPlugin-1.8.4-py2.6.egg/wikiprint/web_ui.py"", line 88, in _render_book
      Code fragment:
      Line	
      83	 
      84	if not format or format not in formats:
      85	raise TracError('Bad format given for WikiPrint output.')
      86	
      87	pdfbookname = title.replace(' ', '_').replace(':', '_').replace(',', '_')
      88	return formats[format]['provider'].process_wikiprint(req, format, title, subject, rightpages, version, date, pdfbookname)
      89	
      90	data['allpages'] = allpages
      91	leftpages = [x for x in allpages if x not in rightpages]
      92	leftpages.sort()
      93	data['leftpages'] = leftpages
      Local variables:
      Name	Value
      allpages 	[u'WikiNewPage', u'Projektphase/Erweiterungen/Makros', u'TracModWSGI', ...
      cat 	u'wikiprint'
      component 	None
      data 	{}
      date 	u''
      format 	u'pdfarticle'
      formats 	{'pdfbook': {'name': 'PDF Book', 'provider': ...
      name 	'HTML'
      page 	u'makebook'
      pdfbookname 	u'Projektphase'
      provider 	<wikiprint.formats.WikiPrintOutput object at 0xa24f1ac>
      req 	<Request ""POST '/admin/wikiprint/makebook'"">
      rightpages 	[u'Inhaltsverzeichnis', u'Projektphase/Anforderungen', ...
      self 	<wikiprint.web_ui.WikiPrintAdmin object at 0x9743b8c>
      subject 	u''
      title 	u'Projektphase'
      version 	u''
      x 	''
    * File ""/usr/local/lib/python2.6/dist-packages/TracWikiPrintPlugin-1.8.4-py2.6.egg/wikiprint/formats.py"", line 40, in process_wikiprint
      Code fragment:
      Line	
      35	 
      36	if format == 'pdfbook':
      37	out = wikiprint.html_to_pdf(req, html_pages, book=True, title=title, subject=subject, version=version, date=date)
      38	req.send_header('Content-Disposition', 'attachment; filename=' + pdfname + '.pdf')
      39	elif format == 'pdfarticle':
      40	out = wikiprint.html_to_pdf(req, html_pages, book=False, title=title, subject=subject, version=version, date=date)
      41	req.send_header('Content-Disposition', 'attachment; filename=' + pdfname + '.pdf')
      42	elif format == 'printhtml':
      43	out = wikiprint.html_to_printhtml(req, html_pages, title=title, subject=subject, version=version, date=date)
      44	
      45	req.send_header('Content-Length', len(out))
      Local variables:
      Name	Value
      date 	u''
      format 	u'pdfarticle'
      html_pages 	[<Markup u'<h1 id=""MeinProjekt1"">Mein Projekt 1</h1>\n<ul><li><a ...
      p 	u'Projektphase/Grundlagen'
      pages 	[u'Inhaltsverzeichnis', u'Projektphase/Anforderungen', ...
      pdfname 	u'Projektphase'
      req 	<Request ""POST '/admin/wikiprint/makebook'"">
      self 	<wikiprint.formats.WikiPrintOutput object at 0xa24f1ac>
      subject 	u''
      title 	u'Projektphase'
      version 	u''
      wikiprint 	<wikiprint.wikiprint.WikiPrint object at 0x9743bcc>
    * File ""/usr/local/lib/python2.6/dist-packages/TracWikiPrintPlugin-1.8.4-py2.6.egg/wikiprint/wikiprint.py"", line 235, in html_to_pdf
      Code fragment:
      Line	
      230	cursor = db.cursor()
      231	cursor.execute(""INSERT INTO auth_cookie (cookie,name,ipnr,time) ""
      232	""VALUES (%s, %s, %s, %s)"", (auth_cookie, req.authname, '127.0.0.1', int(time.time())))
      233	db.commit()
      234	
      235	pdf = pisa.CreatePDF(page, pdf_file, show_errors_as_pdf = True, default_css = css_data, link_callback = loader.getFileName)
      236	out = pdf_file.getvalue()
      237	pdf_file.close()
      238	
      239	cursor.execute(""DELETE FROM auth_cookie WHERE cookie=%s"", (auth_cookie,))
      240	db.commit()
      Local variables:
      Name	Value
      auth_cookie 	'f0636deb2cf166f318525a1f2fa4ae0e'
      book 	False
      css_data 	u'\nhtml {\n font-family: Helvetica; \n font-size: 10px; \n ...
      cursor 	<trac.db.util.IterableCursor object at 0xa21a92c>
      date 	u''
      db 	<trac.db.pool.PooledConnection object at 0xa49f324>
      html_pages 	[<Markup u'<h1 id=""MeinProjekt1"">Mein Projekt 1</h1>\n<ul><li><a ...
      loader 	<wikiprint.wikiprint.linkLoader instance at 0xa7a52ec>
      page 	'<html><head><meta http-equiv=""Content-Type"" content=""text/html; ...
      pdf_file 	<StringIO.StringIO instance at 0xa63096c>
      req 	<Request ""POST '/admin/wikiprint/makebook'"">
      self 	<wikiprint.wikiprint.WikiPrint object at 0x9743bcc>
      subject 	u''
      title 	u'Projektphase'
      version 	u''
    * File ""/usr/local/lib/python2.6/dist-packages/pisa-3.0.33-py2.6.egg/sx/pisa3/pisa_document.py"", line 172, in pisaDocument
      Code fragment:
      Line	
      167	 
      168	# Use multibuild e.g. if a TOC has to be created
      169	if c.multiBuild:
      170	doc.multiBuild(c.story)
      171	else:
      172	doc.build(c.story)
      173	 
      174	# Add watermarks
      175	if pyPdf:
      176	for bgouter in c.pisaBackgroundList:
      177	
      Local variables:
      Name	Value
      body 	<sx.pisa3.pisa_reportlab.PmlPageTemplate instance at 0x9f9f34c>
      c 	<sx.pisa3.pisa_context.pisaContext instance at 0xa21a94c>
      capacity 	102400
      debug 	0
      default_css 	u'\nhtml {\n font-family: Helvetica; \n font-size: 10px; \n ...
      dest 	<StringIO.StringIO instance at 0xa63096c>
      doc 	<sx.pisa3.pisa_reportlab.PmlBaseDoc instance at 0xa51478c>
      encoding 	None
      kw 	{'show_errors_as_pdf': True}
      link_callback 	<bound method linkLoader.getFileName of <wikiprint.wikiprint.linkLoader ...
      out 	<sx.pisa3.pisa_util.pisaTempFile object at 0xa63ad6c>
      path 	None
      raise_exception 	True
      show_error_as_pdf 	False
      src 	'<html><head><meta http-equiv=""Content-Type"" content=""text/html; ...
      x 	''
      xhtml 	False
      xml_output 	None
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py"", line 877, in build
      Code fragment:
      Line	
      872	canv._doctemplate = self
      873	while len(flowables):
      874	self.clean_hanging()
      875	try:
      876	first = flowables[0]
      877	self.handle_flowable(flowables)
      878	handled += 1
      879	except:
      880	#if it has trace info, add it to the traceback message.
      881	if hasattr(first, '_traceInfo') and first._traceInfo:
      882	exc = sys.exc_info()[1]
      Local variables:
      Name	Value
      canv 	<reportlab.pdfgen.canvas.Canvas instance at 0xa51442c>
      canvasmaker 	<class reportlab.pdfgen.canvas.Canvas at 0x9a2a29c>
      filename 	None
      first 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
      flowableCount 	169
      flowables 	[PageBreak(), PmlParagraph( 'style' 'style' 'keepWithNext' ...
      handled 	58
      self 	<sx.pisa3.pisa_reportlab.PmlBaseDoc instance at 0xa51478c>
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py"", line 762, in handle_flowable
      Code fragment:
      Line	
      757	self.afterFlowable(f)
      758	else:
      759	frame = self.frame
      760	canv = self.canv
      761	#try to fit it then draw it
      762	if frame.add(f, canv, trySplit=self.allowSplitting):
      763	if not isinstance(f,FrameActionFlowable):
      764	self._curPageFlowableCount += 1
      765	self.afterFlowable(f)
      766	_addGeneratedContent(flowables,frame)
      767	else:
      Local variables:
      Name	Value
      canv 	<reportlab.pdfgen.canvas.Canvas instance at 0xa51442c>
      f 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
      flowables 	[PageBreak(), PmlParagraph( 'style' 'style' 'keepWithNext' ...
      frame 	<reportlab.platypus.frames.Frame instance at 0x9f9f58c>
      self 	<sx.pisa3.pisa_reportlab.PmlBaseDoc instance at 0xa51478c>
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/frames.py"", line 174, in _add
      Code fragment:
      Line	
      169	raise LayoutError(""Flowable %s (%sx%s points) too large for frame (%sx%s points)."" % (
      170	flowable.__class__, w,h, aW,self._aH))
      171	return 0
      172	else:
      173	#now we can draw it, and update the current point.
      174	flowable.drawOn(canv, self._x + self._leftExtraIndent, y, _sW=aW-w)
      175	flowable.canv=canv
      176	if self._debug: logger.debug('drew %s' % flowable.identity())
      177	s = flowable.getSpaceAfter()
      178	y -= s
      179	if self._oASpace: self._prevASpace = s
      Local variables:
      Name	Value
      a 	'_frame'
      aW 	453.54330708661405
      canv 	<reportlab.pdfgen.canvas.Canvas instance at 0xa51442c>
      flowable 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
      h 	188.99999000000003
      p 	70.866141732283495
      s 	0
      self 	<reportlab.platypus.frames.Frame instance at 0x9f9f58c>
      trySplit 	1
      w 	453.54330708661405
      y 	439.77363604724394
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py"", line 106, in drawOn
      Code fragment:
      Line	
      101	def drawOn(self, canvas, x, y, _sW=0):
      102	""Tell it to draw itself on the canvas. Do not override""
      103	x = self._hAlignAdjust(x,_sW)
      104	canvas.saveState()
      105	canvas.translate(x, y)
      106	self._drawOn(canvas)
      107	if hasattr(self, '_showBoundary') and self._showBoundary:
      108	#diagnostic tool support
      109	canvas.setStrokeColor(gray)
      110	canvas.rect(0,0,self.width, self.height)
      111	canvas.restoreState()
      Local variables:
      Name	Value
      _sW 	0.0
      canvas 	<reportlab.pdfgen.canvas.Canvas instance at 0xa51442c>
      self 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
      x 	70.866141732283467
      y 	439.77363604724394
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py"", line 87, in _drawOn
      Code fragment:
      Line	
      82	self.encoding = None
      83	 
      84	def _drawOn(self,canv):
      85	'''ensure canv is set on and then draw'''
      86	self.canv = canv
      87	self.draw()#this is the bit you overload
      88	del self.canv
      89	 
      90	def _hAlignAdjust(self,x,sW=0):
      91	if sW and hasattr(self,'hAlign'):
      92	a = self.hAlign
      Local variables:
      Name	Value
      canv 	<reportlab.pdfgen.canvas.Canvas instance at 0xa51442c>
      self 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py"", line 1272, in draw
      Code fragment:
      Line	
      1267	self._drawBkgrnd()
      1268	if not self._spanCmds:
      1269	# old fashioned case, no spanning, steam on and do each cell
      1270	for row, rowstyle, rowpos, rowheight in zip(self._cellvalues, self._cellStyles, self._rowpositions[1:], self._rowHeights):
      1271	for cellval, cellstyle, colpos, colwidth in zip(row, rowstyle, self._colpositions[:-1], self._colWidths):
      1272	self._drawCell(cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight))
      1273	else:
      1274	# we have some row or col spans, need a more complex algorithm
      1275	# to find the rect for each
      1276	for rowNo in xrange(self._nrows):
      1277	for colNo in xrange(self._ncols):
      Local variables:
      Name	Value
      cellstyle 	<CellStyle1 '(8, 0)'>
      cellval 	<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>
      colpos 	0
      colwidth 	151.18110236220468
      row 	[<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>, ...
      rowheight 	2.9999989999999999
      rowpos 	2.9999990000000087
      rowstyle 	[<CellStyle1 '(8, 0)'>, <CellStyle1 '(8, 1)'>, <CellStyle1 '(8, 2)'>]
      self 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py"", line 1361, in _drawCell
      Code fragment:
      Line	
      1356	if isinstance(cellval,(tuple,list,Flowable)):
      1357	if not isinstance(cellval,(tuple,list)): cellval = (cellval,)
      1358	# we assume it's a list of Flowables
      1359	W = []
      1360	H = []
      1361	w, h = self._listCellGeom(cellval,colwidth,cellstyle,W=W, H=H,aH=rowheight)
      1362	if valign=='TOP':
      1363	y = rowpos + rowheight - cellstyle.topPadding
      1364	elif valign=='BOTTOM':
      1365	y = rowpos+cellstyle.bottomPadding + h
      1366	else:
      Local variables:
      Name	Value
      .3 	(0, 2.9999990000000087)
      .4 	(151.18110236220468, 2.9999989999999999)
      H 	[]
      W 	[]
      cellstyle 	<CellStyle1 '(8, 0)'>
      cellval 	(<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>,)
      colpos 	0
      colwidth 	151.18110236220468
      cur 	<CellStyle1 '(7, 2)'>
      just 	'LEFT'
      rowheight 	2.9999989999999999
      rowpos 	2.9999990000000087
      self 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
      valign 	u'MIDDLE'
    * File ""/usr/local/lib/python2.6/dist-packages/pisa-3.0.33-py2.6.egg/sx/pisa3/pisa_reportlab.py"", line 637, in _listCellGeom
      Code fragment:
      Line	
      632	 
      633	def _listCellGeom(self, V, w, s, W=None, H=None, aH=72000):
      634	# print ""#"", self.availHeightValue
      635	if aH == 72000:
      636	aH = self.getMaxHeight() or aH
      637	return Table._listCellGeom(self, V, w, s, W=W, H=H, aH=aH)
      638	 
      639	def wrap(self, availWidth, availHeight):
      640	 
      641	self.setMaxHeight(availHeight)
      642	 
      Local variables:
      Name	Value
      H 	[]
      V 	(<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>,)
      W 	[]
      aH 	2.9999989999999999
      s 	<CellStyle1 '(8, 0)'>
      self 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
      w 	151.18110236220468
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py"", line 366, in _listCellGeom
      Code fragment:
      Line	
      361	t = 0
      362	w = 0
      363	canv = getattr(self,'canv',None)
      364	sb0 = None
      365	for v in V:
      366	vw, vh = v.wrapOn(canv, aW, aH)
      367	sb = v.getSpaceBefore()
      368	sa = v.getSpaceAfter()
      369	if W is not None: W.append(vw)
      370	if H is not None: H.append(vh)
      371	w = max(w,vw)
      Local variables:
      Name	Value
      H 	[]
      V 	(<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>,)
      W 	[]
      aH 	-1.000000000139778e-06
      aW 	148.18110236220468
      canv 	<reportlab.pdfgen.canvas.Canvas instance at 0xa51442c>
      s 	<CellStyle1 '(8, 0)'>
      sb0 	None
      self 	PmlTable( rowHeights=[17.249999000000003, 17.249999000000003, ...
      t 	0
      v 	<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>
      w 	0
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py"", line 117, in wrapOn
      Code fragment:
      Line	
      112	 
      113	def wrapOn(self, canv, aW, aH):
      114	'''intended for use by packers allows setting the canvas on
      115	during the actual wrap'''
      116	self.canv = canv
      117	w, h = self.wrap(aW,aH)
      118	del self.canv
      119	return w, h
      120	 
      121	def wrap(self, availWidth, availHeight):
      122	""""""This will be called by the enclosing frame before objects
      Local variables:
      Name	Value
      aH 	-1.000000000139778e-06
      aW 	148.18110236220468
      canv 	<reportlab.pdfgen.canvas.Canvas instance at 0xa51442c>
      self 	<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>
    * File ""/usr/local/lib/python2.6/dist-packages/pisa-3.0.33-py2.6.egg/sx/pisa3/pisa_reportlab.py"", line 621, in wrap
      Code fragment:
      Line	
      616	
      617	def wrap(self, availWidth, availHeight):
      618	availWidth = max(availWidth, 1.0)
      619	self.maxWidth = availWidth
      620	self.maxHeight = self.setMaxHeight(availHeight)
      621	return KeepInFrame.wrap(self, availWidth, availHeight)
      622	
      623	class PmlTable(Table, PmlMaxHeightMixIn):
      624	 
      625	def _normWidth(self, w, maxw):
      626	"" Helper for calculating percentages ""
      Local variables:
      Name	Value
      availHeight 	-1.000000000139778e-06
      availWidth 	148.18110236220468
      self 	<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py"", line 944, in wrap
      Code fragment:
      Line	
      939	return W,H
      940	s0 = s1
      941	H0 = H
      942	W0 = W
      943	s1 = H/maxHeight
      944	W, H = func(s1)
      945	self.width = W-_FUZZ
      946	self.height = H-_FUZZ
      947	self._scale = s1
      948	if H<min(0.95*maxHeight,maxHeight-10) or H>=maxHeight+_FUZZ:
      949	#the standard case W should be OK, H is short we want
      Local variables:
      Name	Value
      H 	0
      H0 	0
      LayoutError 	<class 'reportlab.platypus.doctemplate.LayoutError'>
      W 	0
      W0 	0
      availHeight 	-1.000000000139778e-06
      availWidth 	148.18110236220468
      func 	<function func at 0xa5c40d4>
      maxHeight 	-1.000000000139778e-06
      maxWidth 	148.18110236220468
      mode 	'shrink'
      s0 	1
      s1 	-0.0
      self 	<sx.pisa3.pisa_reportlab.PmlKeepInFrame instance at 0xa799d4c>
    * File ""/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py"", line 925, in func
}}}
 
{{{

}}}
",Nvt
8623,New field in the template - USERNAME,enhancement,0.11,charlie@…,new,2011-03-19T16:59:27+01:00,2013-01-13T16:27:59+01:00,"I suggest to add following code in order to enhance the fields for substitution in templates :

In def add_headers() add the two ""#SUBJECT"" rows as following :

{{{
        extra_content = self.get_extracontent(req)
        extra_content = extra_content.replace('#TITLE', title)
        extra_content = extra_content.replace('#VERSION', version)
        extra_content = extra_content.replace('#DATE', date)
        extra_content = extra_content.replace('#SUBJECT', subject)
        extra_content = extra_content.replace('#USER', req.remote_user)

        if book:
            frontpage = self.get_frontpage(req)
            frontpage = frontpage.replace('#TITLE', title)
            frontpage = frontpage.replace('#VERSION', version)
            frontpage = frontpage.replace('#DATE', date)
            frontpage = frontpage.replace('#SUBJECT', subject)
            frontpage = frontpage.replace('#USER', req.remote_user)

}}}",charlie@…
8622,Kerberos / NTLM / Windows authentication in urllib2,enhancement,0.11,,new,2011-03-19T14:58:24+01:00,2019-08-11T22:36:59+02:00,"Is there any way to get working the Windows Authentication (Kerberos/NTML) in TracWikiPrintPlugin (through the used urllib2), please? 

",charlie@…
7375,Support for rendering redirected pages (ServerSideRedirectPlugin),enhancement,0.11,,new,2010-07-12T18:24:11+02:00,2019-08-11T22:36:59+02:00,"ServerSideRedirectPlugin allows one to place a redirect macro at the start of any wiki page which will cause a server side redirect when the wiki page is viewed.

I would like the TracWikiPrintPlugin macro to be aware of the redirect macro and instead of rendering the page with the redirect (which would be blank because it's just a redirect) it renders the page it's redirected to. 

For example, https://server/trac/project/wiki/Meetings/CurrentStatus redirects to https://server/trac/project/wiki/Meetings/2010-06-28?redirectedfrom=CurrentStatus.

I am requesting that https://server/trac/project/wiki/Meetings/CurrentStatus?format=printhtml redirect to the html output of https://server/trac/project/wiki/Meetings/2010-07-12?redirectedfrom=CurrentStatus?format=printhtml.

I apologize in advance if this enhancement request should be made against the ServerSideRedirectPlugin.",Lucas Rangit MAGASWERAN
7103,Print UTF-8 encoded wiki pages,defect,0.12,,new,2010-05-11T11:47:44+02:00,2019-08-11T22:36:59+02:00,"as I print page containing utf-8 characters all I get is '????' strings. 
",anonymous
6784,Fails with multiple pages and AddComment macro,defect,0.12,,new,2010-03-09T09:27:28+01:00,2019-08-11T22:36:59+02:00,"I am using TracWikiPrintPlugin to make a PDF from a couple of pages. These pages may each have the !AddComment macro. It seems, however, that when TracWikiPrintPlugin is doing it's thing, the pages are handled in such a way that the !TracAddCommentMacro macro thinks it has been added more than once. This is not the case on any individual page. I can view all the constituent pages just fine. It is only the TracWikiPrintPlugin processing that has a problem. From the log:

{{{
2010-03-09 08:54:16,396 Trac[formatter] ERROR: Macro AddComment(None) failed: 
Traceback (most recent call last):                                            
  File ""/usr/lib/python2.5/site-packages/Trac-0.12multirepos-py2.5.egg/trac/wiki/formatter.py"", line 494, in _macro_formatter
    return macro.process(args, in_paragraph=True)                                                                            
  File ""/usr/lib/python2.5/site-packages/Trac-0.12multirepos-py2.5.egg/trac/wiki/formatter.py"", line 192, in process         
    text = self.processor(text)                                                                                              
  File ""/usr/lib/python2.5/site-packages/Trac-0.12multirepos-py2.5.egg/trac/wiki/formatter.py"", line 179, in _macro_processor
    text)
  File ""build/bdist.linux-i686/egg/addcomment/macro.py"", line 41, in expand_macro
    raise TracError('\'AddComment\' macro cannot be included twice.')
TracError: 'AddComment' macro cannot be included twice.
2010-03-09 08:54:16,549 Trac[macros] WARNING: Executing pre-0.11 Wiki macro Include by provider <class 'includemacro.macros.IncludeMacro'>
}}}
",roger@…
5712,Custom Page Break,enhancement,0.11,,new,2009-08-25T01:13:05+02:00,2019-08-11T22:36:59+02:00,"For PDF Books, page breaks always occur after wiki articles. Sometimes depending on how your wiki is structured this can be inappropriate. It would be nice if the ""Selected Pages"" box could (in addition to wiki pages) be populated be a page break (perhaps with a page break appearing by default after each one) so that users can control where page breaks are manually.",tom@…
5321,table column width,defect,0.11,,new,2009-06-03T11:10:08+02:00,2019-08-11T22:36:59+02:00,"how can i format my tables with the ""table-layout: automatic"" format? for example: in a 3-column table, instead to have a fixed 33% width for each column, i want to automatic width associated on the content cell. If I have in the first column the code number (# 1, 2, 3, ...), in the second a name, and in the 3th the description (long), my printed table becomes ugly and big. I already tried to use the css formating, without success... thanks",Lucas
5292,Saving the selected pages order,enhancement,0.11,,new,2009-05-27T12:19:26+02:00,2019-08-11T22:36:59+02:00,"Allow the saving of the combinated pages selection would be great when the project has a lot of pages and the user has to select often. 
",Lucas
4890,Reports to PDF,enhancement,0.11,,new,2009-04-06T11:32:40+02:00,2019-08-11T22:36:59+02:00,Allow conversion from reports/query to PDF.,Álvaro Iradier
4889,Links in TOC,enhancement,0.11,,new,2009-04-06T11:32:00+02:00,2019-08-11T22:36:59+02:00,"Allow the Table of Contents to have internal links to the PDF.

Internal links are supported by reportlabs, so I guess it's a matter of creating the anchors in headers, and using some reportlab option when making the TOC.",Álvaro Iradier
4867,allow TracNav  for defining the contents,enhancement,0.11,,new,2009-04-02T16:31:59+02:00,2019-08-11T22:36:59+02:00,"i was very happy to see this plugin, it solves a longstanding issue we had with wiki's in general!

what would make it even better is the support of TracNav to support the table of contents.
",rupert thurner
4866,allow TagsPlugin to define (part of) the table of contents,enhancement,0.11,,new,2009-04-02T16:30:49+02:00,2019-08-11T22:36:59+02:00,"
generating (parts of) the contents by including a section defined by tags (TagsPlugin) would be great.
",rupert thurner
