1

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.

blueberryfields
  • 45,910
  • 28
  • 89
  • 168

2 Answers2

2

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.

Smart003
  • 1,119
  • 2
  • 16
  • 31
IanRiley
  • 233
  • 1
  • 10
0

change inside function send_pdf(self,data):

  'Content-Disposition': 'inline; filename="%s"' ...

to

  'Content-Disposition': 'attachment; filename="%s"' ...
buddemat
  • 4,552
  • 14
  • 29
  • 49
hamstie
  • 1
  • 1