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

HelpOnInstalling/ApacheOnWin32withFastCgi

Configuring FastCGI on Apache on Windows

(And adding it as a local service)

Moin in the standard CGI configuration is perfectly fine for small workgroups or internal wiki's. But, if you want to take your wiki performance to the next level, FastCGI is the way to go. FastCGI will have a noticeable and dramatic impact on speed, which is particularly noticeable on pages with lots of images. Among other tricks, FastCGI works by keeping the python process open, thereby reducing the small delay caused by waiting for a python process to open for each request. More info is available on the FastCGI webpage.

This document borrows from HelpOnInstalling/FastCgi; but here I try to provide a concrete example that will give you a working wiki on the Windows platform, detailing all the files that need to be configured within your moin setup.

Prerequisites & Requirements

  1. You already have working copy of MoinMoin on Windows - (See HelpOnInstalling/ApacheOnWin32)

  2. You're running Moin version 1.5.x or later.

  3. Assumes your wiki instance is located at d:\moin\mywiki (You will have to adjust these instructions to your specific set up).

  4. If you run (or anticipate running) multiple wiki's on the same server, you will want to have your wiki-farm configured and working first. (You will make life easier for yourself-- because of how FastCGI works, you will not be able to easily call two .FCG files at the same time (nor will it make sense to) from setting up the WikiFastCGIservice below, etc. If you are only setting up one wiki, then by all means, proceed... (see also HelpOnConfiguration and FarmQuestions).

(See also HelpOnInstalling/FastCgi)

Install FastCGI

  1. Download the latest compiled mod_fastcgi.dll from http://fastcgi.com/dist/ e.g., mod_fastcgi-SNAP-0404142202-AP2.dll

  2. Optionally rename it to mod_fastcgi.dll (if you choose not to rename it, be sure to specify the full name in the LoadModule line on the httpd.conf file).

  3. Copy it into the Apache2\modules folder at c:\Program Files\Apache Software\Apache2\modules\.

FastCGI MoinMoin Configuration

  1. Copy moin.fcg from d:\Python25\share\moin\server to your instance home, d:\Moin\mywiki

  2. Modify the moin.fcg to match your configuration:

    1. Change the first-line shebang statement to point to your python installation. This would be exactly has your old working moin.cgi file:

    2. change the sys.path.insert like to point to your wikiconfig.py file (again, just like in your old working moin.cgi file). If you're using a farm, point instead to your farmconfig.py file:

      sys.path.insert(0, r'd:\moin\mywiki\wikiconfig.py')
    3. The last lines of the moin.fcg file will be similar to below. For Windows, we need to specify a port number. You can select other port number other than 9001, but it should match the one in httpd.conf (see next section below). (note: in case your browser window wraps the below example, the fcg = thfcgi.FCGI is all one line, and fcg.run() is on it's own separate line).

      if __name__ == '__main__':
          fcg = thfcgi.FCGI(handle_request, port=9001, max_requests=max_requests, backlog=backlog, max_threads=max_threads)
          fcg.run()

httpd.conf Configuration

Open your Apache config file (c:\Program Files\Apache Software\Apache2\conf\), and add the following directives:

  1. Scroll down to the LoadModule section and add mod_fastcgi.dll, like in the example below (if you didn't rename your file, you'll need to exactly to match your file name):

    LoadModule fastcgi_module modules/mod_fastcgi.dll
  2. Scroll down to the AddHandler section and add the following:

    AddHandler fastcgi-script .fcg
  3. Modify your ScriptAlias line to point to your moin.fcg file (fas we configured in the section above). There are two options here; if you are running a single wiki, use i. If you have a wiki farm, use ii:

    1. Example if you're running a single wiki:
      ScriptAlias /mywiki    "d:/Moin/mywiki/moin.fcg"
    2. Example if you're running multiple wiki's (i.e. a wiki farm):
      ScriptAlias /mywiki     "d:/Moin/moin.fcg"
      ScriptAlias /yourwiki   "d:/Moin/moin.fcg"
      ScriptAlias /theirwiki  "d:/Moin/moin.fcg"
  4. Register the moin.fcg as an external server. This needs to match the port we specified in moin.fcg in the steps above (if you changed the port number). Make sure the path to moin.fcg points to the correct location. We'll also specify the loopback IP, instead of the interface IP, so that it will work even if the computer's IP address changes.

    FastCgiExternalServer d:/Moin/mywiki/moin.fcg -host 127.0.0.1:9001

When finished, you should have something similar to this at the tail of your httpd.conf file:

### point to the python wiki htdocs:
Alias       /wiki/    "D:/Python25/share/moin/htdocs/"
### Your ScriptAlias(es) need to point to your .fcg files:
ScriptAlias /mywiki    "D:/moin/moin.fcg"
ScriptAlias /yourwiki   "D:/moin/moin.fcg"
### Setting the external server:
FastCgiExternalServer d:/Moin/moin.fcg -host 127.0.0.1:9001

Move your old moin.cgi elsewhere to ensure that it's not being called.

You're done! Now it's time to test.

Open a commandline window (Start > Run... > type cmd), navigate to your moin.fcg location, and type the following command (substituting your python path, as necessary). Leave the window open while you test (closing it will quit the python process).

d:\python25\python moin.fcg

If all went well (and you marveled at how much faster moin is now), you can now proceed to the next section to register moin.fcg as a local service. This ensures that moin will come up across restarts.





Register moin.fcg as a local service

We're now going to create a new service that automatically starts our moin.fcg after reboots.

  1. Download & install the MS Windows 2003 Resource Kit. (of course, you already have the Resource Kit installed, since you're using RoboCopy to back up your wiki, right?! See HelpOnInstalling/Win32MoinEasyBackup). We need two commands from the Resource Kit, srvany.exe and instsrv.exe. For convenience sake, you can optionally move these to some place more convenient (you'll have to navigate to them via the commandline).

  2. From the commandline (Start > Run... > type cmd), navigate to your Resource Kit folder and type the following to create a new service, which we'll name WikiFastCGIservice. You can use a different name, if you prefer.

    INSTSRV WikiFastCGIservice C:\Windows\system\srvany.exe
  3. Now we have just created the service, we have to configure it. Run regedit.exe (Start > Run... > type regedit):

    1. Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\, create a new key (right-click > New > Key) called WikiFastCGIservice.

    2. Under the WikiFastCGIservice you created above, create a new key (right-click > New > Key) named Parameters

    3. Within the Parameters key, create a new string value (right-click > New > String Value) named Application (key value will be listed as REG_SZ type). Double-click your value and specify the path of application:

      d:\Python25\python.exe
    4. Within the Parameters key: perform the same steps above, this time creating an AppParameters value and specify a parameter:

      d:\Moin\mywiki\moin.fcg
    5. Within the Parameters key: perform the same steps above, this time creating an AppDirectory value and specify the current directory:

      d:\Moin\mywiki
  4. Now configure it via the Services applet (Start > Settings > Control Panels > Administrative Tools > Services), such as automatic start.

You're finished!

  • <!> Note: For now on, whenever you make changes to to your wikiconfig.py/farmconfig.py, you will need to restart WikiFastCGIservice via the Services applet (Start > Settings > Control Panels > Administrative Tools > Services) apply the changes.