我已经在mac上安装了moinmoin1.9.7,并添加了CreatePdfDocument操作。当使用一个非常基本的页面时(只包含字符串"this page is left intentionally blemaintilitential空白“),我可以通过以下命令调出pdf配置菜单
http://somehost:8080/Page?action=CreatePdfDocument
并且可以继续到服务器尝试生成pdf - it重定向到的点:
http://localhost:8080/Page
然后提供以下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>
moin-moin服务器似乎在最后一个请求上挂起,从未返回生成的pdf。我已经在CreatePdfDocument操作源代码中添加了一些调试语句,并且可以看到生成了正确的pdf。
你知道哪里可能出问题了吗,或者我可以从哪里开始调试这个问题?由于服务器在最后一个请求上挂起/没有响应,我在找出问题所在时遇到了麻烦。
发布于 2018-07-23 03:20:48
不是你的问题的直接答案,但是几年前,我想出了我自己的方法,使用CreatePdfDocument在MoinMoin中创建PDF,因为我发现像PDF这样的东西很麻烦。如果您仍然感兴趣,请查看我的自助方法here。它现在已经令人满意地工作了几年。另外,很抱歉没有添加这个作为评论,但我不被允许在这个阶段这样做。
发布于 2021-12-28 08:26:22
在函数send_pdf(self,data)中更改
'Content-Disposition': 'inline; filename="%s"' ...至
'Content-Disposition': 'attachment; filename="%s"' ...https://stackoverflow.com/questions/15954877
复制相似问题