plonezopebuildoutploneformgen

Using zopyx.smartprintng.plone receive "[Errno 111] Connection refused" when trying to generate PDF


Overview

A client contacted us requesting that when they fill in a form on their site (created with PloneFormGen), they want the input of the form sent to the customer in PDF format (the converted form must be then printed, signed and posted back to the customer).

I jumped on the Plone.org IRC room and asked the guys there, they suggested I use the zopyx.smartprintng.plone add-on. This seemed perfect because they have a script adapter example for PloneFormGen that I can use to convert the form input into a PDF file.

The docs for the add-on are on this page:

http://docs.produce-and-publish.com/#produce-publish-client-connector

Going on that I was told I only needed to install the "Produce and Publish Client Connector" I proceeded to follow the installation instructions on the documentation.

The Installation

The buildout installation went fine, it reported no errors at all and my buildout reflects exactly what they state it must on that installation documentation page.

However I noticed that under "Add/Remove Add-ons" in the Plone Control Panel, I could see no reference to this add-on, thus preventing me from actually enabling it on the particular site I am working on. (I have a feeling this may be the cause of the problem I am experiencing, but I have no idea how to resolve it). - I have checked portal_quickinstaller and it's not there either.

The Problem

According to the documentation appending @@asPlainPDF to the URL of the page you want to render will then render the PDF for you.

So I enter mysite.com/front-page/@@asPlainPDF in my browser.

Upon doing this I receive this traceback:

    Traceback (innermost last):
      Module ZPublisher.Publish, line 126, in publish
      Module ZPublisher.mapply, line 77, in mapply
      Module ZPublisher.Publish, line 46, in call_object
      Module zopyx.smartprintng.plone.browser.pdf, line 249, in __call__
      Module zopyx.smartprintng.plone.browser.pdf, line 85, in __call__
      Module zopyx.smartprintng.plone.browser.pdf, line 232, in __call2__
      Module zopyx.smartprintng.client.zip_client, line 192, in convertZIP2
      Module xmlrpclib, line 1224, in __call__
      Module xmlrpclib, line 1578, in __request
      Module xmlrpclib, line 1264, in request
      Module xmlrpclib, line 1292, in single_request
      Module xmlrpclib, line 1439, in send_content
      Module httplib, line 954, in endheaders
      Module httplib, line 814, in _send_output
      Module httplib, line 776, in send
      Module httplib, line 757, in connect
      Module socket, line 571, in create_connection
    error: [Errno 111] Connection refused 

If you need more information than this please tell me where to get it and I shall provide it to you.

I have Google'd the error: [Errno 111] Connection refused message but it is either people experiencing issues with a Python program they are writing or a different add-on named zopyx.smartprintng.lite

I did find this thread however: https://groups.google.com/forum/#!msg/plone-users/wCuO4RCUIQk/VslwOXvs4XwJ

So as one user suggested I tried installing zopyx.smartprintng.server however that started complaining that I had the wrong version of zope.configuration, and wants >=3.8.0dev upon pinning that to 4.0.2 as it was the latest I could find, it then started complaining about another add-on and I got some buildout errors, which then bricked my Plone server (stopped the clients from coming up) and I had to re-run buildout from a backup buildout.cfg I made so it would make the necessary zope.conf files.

Server information

Summary

  1. Followed these installation instructions:

    http://docs.produce-and-publish.com/#produce-publish-client-connector

  2. Received the above traceback trying to convert PDF when appending @@asPlainPDF to URL

  3. Attempts to install zopyx.smartprintng.server have failed.


Solution

  • The Produce-and-publish set of components does indeed require the server to be set up. The Plone product you installed is merely the integration point between Plone and that server.

    Please to follow the instructions on http://docs.produce-and-publish.com/server/installation.html to install that separate server (it can have it's own buildout).

    (If you run into problems with that installation, feel free to ask a new question here on Stack Overflow, or ask on the Plone Users mailinglist, or contact the author (which may require you to pay Zopyx for such support)).