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
Modifica History Actions

Hybrid_UEFI_MBR_USB_Drive

An Hybrid UEFI GPT + BIOS GPT/MBR boot USB disk is a disk that works on both UEFI and BIOS PCs.

Requisites:

  • A working Linux installation with the following packages: grub2, grub2-efi, gdisk (on Debian Jessie: grub-pc-bin, grub-efi, grub-efi-amd64, gdisk)

  • An USB drive
  • Some Linux ISO.

Step 1: get the right /dev

From now on we will use a root shell because almost all commands we will use require it.

root@debianvm:~# fdisk -l

...............

Disk /dev/sdc: 14.9 GiB, 16005464064 bytes, 31260672 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1           2 31260671 31260670 14.9G af HFS / HFS+

Find the right dev (ie: mine was /dev/sdc and I WILL USE IT IN THE GUIDE, you have to use your dev).

Step 2: make GUID partition table and partitions

root@debianvm:~# gdisk /dev/sdc
And then we are in gdisk prompt; from now on just give the commands in bold and the press enter.

GPT fdisk (gdisk) version 0.8.10

Partition table scan:

  • MBR: MBR only
    BSD: not present
    APM: not present
    GPT: not present

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

Warning! Main partition table overlaps the first partition by 32 blocks!
You will need to delete this partition or resize it in another utility.

Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y

Command (? for help): n Partition number (1-128, default 1): 
First sector (34-31260638, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-31260638, default = 31260638) or {+-}size{KMGTP}: +1M
Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): EF02
Changed type of partition to 'BIOS boot partition'

Command (? for help): n
Partition number (2-128, default 2):
First sector (34-31260638, default = 4096) or {+-}size{KMGTP}:
Last sector (4096-31260638, default = 31260638) or {+-}size{KMGTP}: +50M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): EF00
Changed type of partition to 'EFI System'

Command (? for help): n
Partition number (3-128, default 3):
First sector (34-31260638, default = 106496) or {+-}size{KMGTP}:
Last sector (106496-31260638, default = 31260638) or {+-}size{KMGTP}: 
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 0700
Changed type of partition to 'Microsoft basic data'

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
Now gdisk will quit, it's ok.

Step 3: make hybrid GUID/MBR

root@debianvm:~# gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 1 2 3
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): n

Creating entry for GPT partition #1 (MBR partition #1)
Enter an MBR hex code (default EF): EF02
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default EF): EF00
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #3 (MBR partition #3)
Enter an MBR hex code (default 07): 0700
Set the bootable flag? (Y/N): y

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
gdisk will quit (again) and it's ok.

Step 4: format the partitons

We have to format in FAT32 two of the three partitions, /dev/sdc2 and /dev/sdc3. Umount the partitions if mounted and then:

root@debianvm:~# mkfs.fat -F32 -n GRUB2EFI /dev/sdc2
mkfs.fat 3.0.27 (2014-11-12)

root@debianvm:~# mkfs.fat -F32 -n DATA /dev/sdc3
mkfs.fat 3.0.27 (2014-11-12)

Now the partitons are ready, we will mount /devsdc2 to /mnt/efi and /dev/sdc3 to /mnt/data.

root@debianvm:~# mkdir /mnt/efi
root@debianvm:~# mkdir /mnt/data
root@debianvm:~# mount /dev/sdc2 /mnt/efi/
root@debianvm:~# mount /dev/sdc3 /mnt/data/

Step 5: install grub

In this step we will install grub in EFI partition (mounted in /mnt/efi) and in MBR.

root@debianvm:~# grub-install --target=x86_64-efi --efi-directory=/mnt/efi --boot-directory=/mnt/data/boot --removable --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.

root@debianvm:~# grub-install --target=i386-pc --boot-directory=/mnt/data/boot --recheck /dev/sdc
Installing for i386-pc platform.
Installation finished. No error reported.

Step 6: create folders for ISOs

In /mnt/data we should now have only one directory, boot; let's create a directory for the ISOs.

root@debianvm:~# mkdir /mnt/data/iso
In /mnt/data we should now have
/mnt/data/
- - - - - - - /boot/
- - - - - - - - - - - /grub/
- - - - - - - /iso/
Now we add 2 folders in /iso, one for the other ISOs and one for Debian (this is a workaround for a known bug).
root@debianvm:~# mkdir /mnt/data/iso/debian
root@debianvm:~# mkdir /mnt/data/iso/others

Let's download some ISOs, here i will explain ho to configure grub to boot Debian XFCE amd64 Installer and Tails i386; here there are instructions for other distros.

Debian

Download:

And put these files into /mnt/data/debian/

Tails

Download the iso torrent. Then create a folder for tails and copy there the iso.

root@debianvm:~# mkdir /mnt/data/others/tails

In /mnt/data we should now have
/mnt/data/
- - - - - - - /boot/
- - - - - - - - - - - /grub/
- - - - - - - /iso/
- - - - - - - - - - - /debian/
- - - - - - - - - - - - - - - - debian-8.5.0-amd64-xfce-CD-1.iso
- - - - - - - - - - - - - - - - vmlinuz
- - - - - - - - - - - - - - - - initrd.gz
- - - - - - - - - - - /others/
- - - - - - - - - - - - - - - - /tails/
- - - - - - - - - - - - - - - - - - - - tails-i386-2.5.iso

Step 7: configure grub

Now we need to configure grub; grub at boot reads its config from a config file (grub.cfg). Create a grub.cfg file with the following content and copy it into /mnt/data/boot/grub/:

# path to the partition holding ISO images (using UUID)
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"

insmod exfat

# Setup video
if [ "$grub_platform" = "efi" ]
then
    insmod efi_gop
    insmod efi_uga
fi

if [ "$grub_platform" = "pc" ]
then
    insmod vbe
fi

# Setup font
insmod font

if loadfont ${prefix}/fonts/unicode.pf2
then
    insmod gfxterm
    set gfxmode=auto
    set gfxpayload=keep
    terminal_output gfxterm
fi

# Setup GRUB Screen
insmod jpeg
if background_image /boot/grub/grub_bg.jpg ; then
    set color_normal=white/black
    set color_highlight=white/green
else
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
fi

menuentry "Tails 2.5 i386" {
    set isofile='/iso/others/tails/tails-i386-2.5.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz2 boot=live config findiso=${isofile} live-media=removable apparmor=1 security=apparmor nopersistent noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 noautologin module=Tails i2p
    initrd (loop)/live/initrd2.img
}

menuentry 'Debian 8.5.0 amd64 CD 1 XFCE' {
        set isofile='/iso/debian/debian-8.5.0-amd64-xfce-CD-1.iso'
        set initrdfile='/iso/debian/initrd.gz'
        loopback loop $isofile
        linux (loop)/install.amd/vmlinuz iso-scan/ask_second_pass=true
        initrd $initrdfile
}
menuentry "Reboot" {
        echo "System rebooting..."
        reboot
}

menuentry "Shutdown" {
        echo "System shutting down..."
        halt
}

It's done! If you want to customize grub's background copy a .jpg into /mnt/boot/grub/ and rename it grub_bg.jpg. Now unmount the USB drive and test it.
root@debianvm:~# umount /mnt/efi
root@debianvm:~# umount /mnt/data

Sources: arch linux wiki and many other sites.