Input

book: Create a structured PDF document with headings, chapters, etc.
webpage: Specifies that the HTML sources are unstructured (plain web pages.) A page break is inserted between each file or URL in the output.
continuous: Specifies that the HTML sources are unstructured (plain web pages.) No page breaks are inserted between each file or URL in the output.
Title of the document for the front page.
Extract the first heading of the document and use it as title. If checked the title field has no effect.
The title image or HTML page. These file has to be an attachments!
Specify document version to be displayed on the title page.
Intellectual property owner of this document.
Copyright notice for this document.
Information about who and when modified the document are applied at the end.

Output

Specifies the output format.
Grayscale document  Title page
Compression :   JPEG big images 

Pagina

 
User defined page size 
Choose one of the predefined standard sizes or select user defined.
Specifies the page size using a standard name or in points (no suffix or ##x##pt), inches (##x##in), centimeters (##x##cm), or millimeters (##x##mm).
Set the target browser width in pixels (400-1200). This determines the page scaling of images.
   2-Sided   Landscape
   
   
   
Specifies the margin size using points (no suffix or ##x##pt), inches (##x##in), centimeters (##x##cm), or millimeters (##x##mm). Keep empty for default value.
Left
Middle
Right
Sets the page header to use on body pages.
Left
Middle
Right
Sets the page footer to use on body pages.

Indice

Sets the number of levels in the table-of-contents. Empty for unlimited levels.
   Numbered headings Check to number all of the headings in the document.
Sets the title for the table-of-contents. Empty for default title.
Left
Middle
Right
Sets the page header to use on table-of-contents pages.
Left
Middle
Right
Sets the page footer to use on table-of-contents pages.

Colors

Enter the HTML color for the body (background).
Enter the image file for the body (background). These file has to be an attachments!
Enter the HTML color for the text.
Sets the color of links.
Enables generation of links in PDF files.

Fonts

Set the default size of text.
Set the spacing between lines of text.
Choose the default typeface (font) of text.
Choose the default typeface (font) of headings.
Set the size of header and footer text.
Choose the font for header and footer text.
Change the encoding of the text in document.
Check to embed font in the output file.

PDF

Controls the initial viewing mode for the document.
Document: Displays only the docuemnt pages.
Outline: Display the table-of-contents outline as well as the document pages.
Full-screen: Displays pages on the whole screen; this mode is used primarily for presentations.
Controls the initial layout of document pages on the screen.
Single: Displays a single page at a time.
One column: Displays a single column of pages at a time.
Two column left/right: Display two columns of pages at a time; the first page is displayed in the left or right column as selected.
Choose the initial page that will be shown.

Security

Check to number all of the headings in the document.
 Versione stampabile   Modify
 Copy   Annotate
Specifies the document permissions.
Specifies the user password to restrict viewing permissions on this PDF document. Empty for no encryption.
Specifies the owner password to control who can change document permissions etc. If this field is left blank, a random 32-character password is generated so that no one can change the document.

Expert

Specify language to use for date and time format.
Shrink code blocks on page.
Show line numbers for code blocks.
Make spaces visable by dots (·) instead of white spaces.
Make line breaks visable by a extra character (¶) at the end.
Enable this feature if you searching for problems or intent to report a bug report

About

Version 2.4.2 (MoinMoin 1.9.7)


MoinMoin - Generate PDF document using HTMLDOC

This action script generate PDF documents from a Wiki site using
the HTMLDOC (http://www.htmldoc.org) software packages which has
to be preinstalled first.

Copy this script in your's MoinMoin action script plugin directory.

Thanks goes to Pascal Bauermeister who initiated the implementaion.
Lot of things changes since then but the idear using HTMLDOC is the
main concept of this implementation.

Please visit the homepage for further informations:
http://moinmo.in/ActionMarket/PdfAction

@copyright: (C) 2006 Pascal Bauermeister
@copyright: (C) 2006-2010 Raphael Bossek <raphael.bossek@solutions4linux.de>
@license: GNU GPL, see COPYING for details

       

Italiano English
Locked History Actions

HelpOnAuthentication

How Authentication works with MoinMoin

MoinMoin has traditionally used cookie-based authentication: you log in via the form on page UserPreferences, then MoinMoin sets a cookie for authenticating you - until you log off which deletes the cookie (or until the cookie expires).

For running MoinMoin in a corporate environment this cookie-based system would prove unreliable and insecure. Therefore, MoinMoin can also use HTTP basic auth based authentication, when being run with web servers (e.g. Apache) that support it.

MoinMoin now has freely configurable modular authentication. Using the auth configuration value will set up a list of authentication methods that are processed in exactly that order.

When an external user database is used, you may not want to recreate all of the user accounts in MoinMoin. In this case the configuration option user_autocreate can be used. Setting it to True will allow a new user profile to be created automatically when a new user has passed authentication (and the auth method supports auto creation).

Presently the following authentication methods are supported:

  • Server setup

    Authentication

    Auth method in moin

    All

    by moin via own cookie

    MoinMoin.auth.moin_login and MoinMoin.auth.moin_session

    by moin via external cookie

    see contrib/auth_externalcookie/ or HelpOnAuthentication/ExternalCookie

    Apache with CGI, modpy or FastCgi

    by Apache modules: HTTP Basic, HTTP Digest, Active Directory (via SSPI), or LDAP

    MoinMoin.auth.http.http

    by moin via LDAP

    MoinMoin.auth.ldap_login.ldap_login (must combine with moin_session to keep the session)

    Apache+SSL with CGI, modpy or FastCgi

    by Apache via SSL client certificate

    MoinMoin.auth.sslclientcert.sslclientcert

    Twisted

    HTTP Basic (but does not request authentication by header, so this is currently only useful for automated stuff, not for browser use)

    MoinMoin.auth.http.http

    IIS

    HTTP Basic, SSPI (aka NTLM), (?)

    MoinMoin.auth.http.http, (?)

Other "auth" methods

These are not strictly auth methods, as they don't authenticate users, but use auth information for other purposes:

  • MoinMoin.auth.log.log

    will just log login/logout/name, nothing else

Shipped plugins

moin_login and moin_session auth (default)

   1     from MoinMoin.auth import moin_login, moin_session
   2     auth = [moin_login, moin_session]

This is the default auth list moin uses (so if you just want that, you don't need to configure it).

moin_session should always be included since it manages the session cookie which is useful even if you don't authenticate using it since it manages session state. See HelpOnSessions for more information.

moin_anon_session

See HelpOnSessions.

http auth

To activate http authentication you have to add following lines to wikiconfig.py:

   1     from MoinMoin.auth.http import http
   2     from MoinMoin.auth import moin_session
   3     auth = [http, moin_session]

For HTTP basic auth used with a web server like Apache, the web server handles authentication before moin gets called. You either enter a valid username and password or your access will be denied by the web server.

So moin's http auth method will just check if user authentication happened:

  • if yes, it will return a user object based on the authenticated user name.
  • if no, it will not return a user object. In this example, there are no other auth methods, so the user will stay unknown.

Well, in reality, it is a bit more complicated indeed:

  • For Twisted we use the username and password stored in the moin user profile. Except wiki xmlrpc usage this is currently not used.
  • For NTLM and Negotiate, we split off everything before the last "\" (usually it is "Domain\username") and we also use title() to normalize "username" to "Username".
  • (!) You usually do want to set user_autocreate = True for this auth method. moin will then auto create a user profile if the authenticated user does not already have one. So the user does not need to create the moin profile himself.

  • See also HelpOnInstalling/ApacheOnWin32withDomainAuthentication for some win32-specific instructions.

sslclientcert auth

To activate authentication via SSL client certificates you have to add following lines to wikiconfig.py:

   1     from MoinMoin.auth.sslclientcert import sslclientcert
   2     from MoinMoin.auth import moin_session
   3     auth = [sslclientcert, moin_session]

For SSL client certificate auth used with a web server like Apache, the web server handles authentication before moin gets called. You either have a valid SSL client certificate or your access will be denied by the web server.

So moin's sslclientcert auth method will just check if user authentication happened:

  • if yes, it will return a user object based on the email address or user name in the certificate.
  • if no, it will not return a user object. In this example, there are no other auth methods, so the user will stay unknown.

    (!) You usually do want to set user_autocreate = True for this auth method. moin will then auto create a user profile if the authenticated user does not already have one. So the user does not need to create the moin profile himself.

php_session

To activate Single-Sign-On integration with PHP applications, use this module. It reads PHP session files and therefore directly integrates with existing PHP authentication systems.

To use this module, use the following lines of code in your configuration:

   1     from MoinMoin.auth.php_session import php_session
   2     from MoinMoin.auth import moin_session
   3     auth = [php_session(), moin_session]

php_session has the following parameters:

   1 php_session(apps=['egw'], s_path="/tmp", s_prefix="sess_")
  • apps is a list of enabled applications

  • s_path is the path of the PHP session files

  • s_prefix is the prefix of the PHP session files

The only supported PHP application is eGroupware 1.2 currently. But it should be fairly easy to add a few lines of code that extract the necessary information from the PHP session.

Interwiki auth

Your moin 1.6 wiki can contact another moin 1.6 wiki to authenticate users (and transfer user profiles):

   1     from MoinMoin.auth.interwiki import interwiki
   2     from MoinMoin.auth import moin_session
   3     auth = [interwiki, moin_session]
   4     trusted_wikis = ['OtherWiki', ]

If you want to use this, you have to enter "OtherWiki UserName" into the login field (without the quotes), the password field gets the password for the user UserName on the wiki OtherWiki.

OtherWiki must be in your interwiki map, so moin can resolve it and it also must be a member of the trusted_wikis list in your wiki configuration.

LDAP auth

See /LDAP.

SMB pseudo-auth method

This method does not really do authentication, it just intercepts user/password from the auth chain to do its own stuff - mounting some smb share on login, umounting on logout:

    smb_server = "smb.example.org" # smb server name
    smb_domain = 'DOMAIN' # smb domain name
    smb_share = 'FILESHARE' # smb share we mount
    smb_mountpoint = u'/mnt/wiki/%(username)s' # where we mount the smb filesystem
    smb_display_prefix = u"S:" # where //server/share is usually mounted for your windows users (display purposes only)
    smb_dir_user = "wwwrun" # owner of the mounted directories
    smb_dir_mode = "0700" # mode of the mounted directories
    smb_file_mode = "0600" # mode of the mounted files
    smb_iocharset = "iso8859-1" # "UTF-8" > cannot access needed shared library!
    smb_coding = 'iso8859-1' # coding used for encoding the commandline for the mount command
    smb_verbose = True # if True, put SMB debug info into log
    smb_log = "/dev/null" # where we redirect mount command output to

This is for very special applications. If you don't know for what to use it, you probably don't need it.

wiki auth

This method was introduced with wikisync.

   1 import xmlrpclib
   2 
   3 name = "TestUser"
   4 password = "secret"
   5 wikiurl = "http://localhost:8080"
   6 
   7 homewiki = xmlrpclib.ServerProxy(wikiurl + "?action=xmlrpc2", allow_none=True)
   8 auth_token = homewiki.getAuthToken(name, password)
   9 
  10 mc = xmlrpclib.MultiCall(homewiki)
  11 mc.applyAuthToken(auth_token)
  12 result = mc()

Combining multiple auth methods

For combining e.g. http and cookie authentication, your wikiconfig.py might contain:

   1     from MoinMoin.auth import moin_login, moin_session
   2     from MoinMoin.auth.http import http
   3     auth = [http, moin_login, moin_session]

In this example, moin will first check if the http auth method gives a valid user. If yes, it will use just that. If not and continue_flag returned by http auth method is True, it will continue checking other auth list method - moin_login and moin_session in this case...

  • (!) Not all combinations make sense, of course.

Making your own auth method

See the commented config file fragment contrib/auth_externalcookie/ and MoinMoin/auth/*.py in your moin distribution archive for examples of how to do authentication.

Here is just a short summary of what's currently possible:

  • use ?action=login login form as user interface for your own auth method for entering name and password

  • use ?action=logout logout action for logging out with your own auth method

  • search existing user profiles for a "matching" user (the match needs not be the name, it can also be the email address or something you put into aliasname)
  • create a user object and let it remember what attributes were determined by auth method (and thus should not be offered on UserPreferences)

  • update values in user's profile from externally provided data
  • autocreate user profiles