Reputation: 50468
I've installed moinmoin 1.9.7 on a mac, and added the CreatePdfDocument action. When using a very basic page (containing only the string "this page is left intentionally blank"), I am able to bring up the pdf configuration menu with
http://somehost:8080/Page?action=CreatePdfDocument
and can proceed to the point where the server attempts to generate the pdf - it redirects to:
http://localhost:8080/Page
and then serves the following html:
<html><body marginwidth="0" marginheight="0" style="background-color: rgb(38,38,38)"><embed width="100%" height="100%" name="plugin" src="http://somehost:8080/Page" type="application/pdf"></body></html>
the moin-moin server appears to hang on that last request, never returning the generated pdf. I've added some debug statements to the CreatePdfDocument action source code, and I can see that the correct pdf is being generated.
Any ideas what might be going wrong, or where I can best start debugging this issue? Since the server is hanging/not responding on the last request, I'm having trouble figuring out what the problem might be.
Upvotes: 1
Views: 114
Reputation: 1
change inside function send_pdf(self,data)
:
'Content-Disposition': 'inline; filename="%s"' ...
to
'Content-Disposition': 'attachment; filename="%s"' ...
Upvotes: 0
Reputation: 233
Not a direct answer to your problem, but some years ago I cooked up my own method to create PDFs in MoinMoin using wkhtmltopdf because I found the likes of the CreatePdfDocument troublesome. If you are still interested, check out my self-help approach here. It has been working satisfactorily now for several years. Also, apologies for not just adding this as comment but I am not permitted to do that at this stage.
Upvotes: 2