wiki page as pdf

13 views
Skip to first unread message

Roger Oberholtzer

unread,
Aug 28, 2017, 3:34:30 AM8/28/17
to trac-...@googlegroups.com
I am running Trac 1.2.2 on Linux. I have a rather simple wiki page
that I want to export as PDF. When I click at the bottom of the wiki
page to download as PDF, I get an empty PDF file. If I download as
Text, I get the expected text in the text file.

I do not see any complaint in the Trac log. Any idea why the PDF
document would be made, but be empty?

--
Roger Oberholtzer

RjOllos

unread,
Aug 28, 2017, 10:22:01 AM8/28/17
to Trac Users
Export to PDF is not a feature provided by Trac. Which plugin are you using?

Do you get an empty PDF on every page you try to export, or only with one of the pages in your system?

- Ryan 

Roger Oberholtzer

unread,
Aug 28, 2017, 10:29:29 AM8/28/17
to trac-...@googlegroups.com
On Mon, Aug 28, 2017 at 4:22 PM, RjOllos <rjo...@gmail.com> wrote:

> Export to PDF is not a feature provided by Trac. Which plugin are you using?

TracWikiToPdfPlugin 3.0.0.dev0 with all options enabled.

There is also an admin page where I can select various pages to put in
a single PDF. But I do not think that is used when exporting a
specific page from the link at the bottom of the page. If I select the
same page there, I also get an empty PDF doc.

> Do you get an empty PDF on every page you try to export, or only with one of
> the pages in your system?

All pages seem to be empty.

--
Roger Oberholtzer

RjOllos

unread,
Aug 29, 2017, 4:29:00 PM8/29/17
to Trac Users
You might need to set the [wikitopdf] htmldoc_path option if htmldoc is not on the system path.

I haven't needed to set it in testing the plugin, however:
$which htmldoc
/usr/local/bin/htmldoc

- Ryan

Roger Oberholtzer

unread,
Aug 30, 2017, 2:07:45 AM8/30/17
to trac-...@googlegroups.com
On Tue, Aug 29, 2017 at 10:28 PM, RjOllos <rjo...@gmail.com> wrote:

> You might need to set the [wikitopdf] htmldoc_path option if htmldoc is not
> on the system path.
>
> I haven't needed to set it in testing the plugin, however:
> $which htmldoc
> /usr/local/bin/htmldoc

A missing htmldoc was the problem. When that was corrected, the
generated file contained content. Thanks!

I'm surprised that there was no complaint in the log.

Next question: is it possible for the document to contain the images
in the page?


--
Roger Oberholtzer

RjOllos

unread,
Sep 4, 2017, 12:21:22 PM9/4/17
to Trac Users


On Tuesday, August 29, 2017 at 11:07:45 PM UTC-7, Roger Oberholtzer wrote:
On Tue, Aug 29, 2017 at 10:28 PM, RjOllos <rjo...@gmail.com> wrote:

> You might need to set the [wikitopdf] htmldoc_path option if htmldoc is not
> on the system path.
>
> I haven't needed to set it in testing the plugin, however:
> $which htmldoc
> /usr/local/bin/htmldoc

A missing htmldoc was the problem. When that was corrected, the
generated file contained content. Thanks!

I'm surprised that there was no complaint in the log.

Errors from os.system go to stderr and are not logged. We should probably be using the subprocess module. I'll look at fixing it.

Next question: is it possible for the document to contain the images
in the page?

Looks like there might be some defects with including images. Keep an eye on this ticket and I'll try to get to it soon:

- Ryan
Reply all
Reply to author
Forward
0 new messages