I am trying to use html2pdf and htmldoc to generate pdfs on the fly. I can get it to work perfectly if I set all view permissions for anonymous. However, this is not suitable for a member only site. Can anyone point me in the right direction for such use? I am using: (Zope 2.9.0, python 2.4.2, win32) and latest version of html2pdf. Regards Garry
Garry Saddington, on 2007-07-12:
I am trying to use html2pdf and htmldoc to generate pdfs on the fly. I can get it to work perfectly if I set all view permissions for anonymous. However, this is not suitable for a member only site. Can anyone point me in the right direction for such use?
I am using: (Zope 2.9.0, python 2.4.2, win32) and latest version of html2pdf.
I would simply say: set the view permissions to Member and not to Anonymous. Then report back here with any errors you get. -- Maurits van Rees | http://maurits.vanrees.org/ [NL] Work | http://zestsoftware.nl/ "Do not worry about your difficulties in computers, I can assure you mine are still greater."
On Thursday 12 July 2007 18:19, Maurits van Rees wrote:
Garry Saddington, on 2007-07-12:
I am trying to use html2pdf and htmldoc to generate pdfs on the fly. I can get it to work perfectly if I set all view permissions for anonymous. However, this is not suitable for a member only site. Can anyone point me in the right direction for such use?
I am using: (Zope 2.9.0, python 2.4.2, win32) and latest version of html2pdf.
I would simply say: set the view permissions to Member and not to Anonymous. Then report back here with any errors you get. In the html2pdf howto at Zope it says 'Only works with anonymous permissions' -- just read it properly!. Probably because the htmldoc process accesses the web page via a URL passed to it by html2pdf. So I guess I will have to pass the rendered page to the script and hence to htmldoc. When I use it now all I get is a nice PDF of the cookiecrumbler login screen and no error messages in the error_log. Thanks for replying, am I on the right lines? Regards Garry
On Thu, 12 Jul 2007 16:57:05 +0100, Garry Saddington wrote:
I am trying to use html2pdf and htmldoc to generate pdfs on the fly. I can get it to work perfectly if I set all view permissions for anonymous. However, this is not suitable for a member only site. Can anyone point me in the right direction for such use?
My experience with htmldoc is that it does work for non-anonymous HTML documents, provided that either (1) there are no images in the document, or (2) any images in the document are visible to anonymous and the image 'src' attributes specify the absolute URL of the image. I strongly suspect that this is because the HTML is handed directly to the htmldoc tool, and then htmldoc tries to access the images from you server. It can't log in, hence the images must be anonymous.
participants (3)
-
Garry Saddington -
Maurits van Rees -
Sam Stainsby