[FM Discuss] PDF generated example (blender)

Andy Oram andyo at oreilly.com
Mon Jun 2 10:54:40 PDT 2008


Looks like a good start, but I'm sure a few hours with a designer could improve it. Also, this is a good time to think about some kind of branding for FLOSSmanuals that you could try to keep stable while allowing the look of the books to evolve.

Andy

----- Original Message -----
From: "adam hyde" <adam at flossmanuals.net>
To: "floss" <discuss at lists.flossmanuals.net>
Sent: Monday, June 2, 2008 6:05:06 AM (GMT-0500) America/New_York
Subject: [FM Discuss] PDF generated example (blender)

hi,

I just thought I would do a quick follow up with an example of the PDF
Luka is generating straight from HTML -> PDF using the new code he has
developed.

There is an example manual online (Blender), it is located here:
http://adam.engagetv.com/pdf/

The TOC is not in place yet, but you can see that its looking very nice.
What is interesting to notice is that the formatting is 'book'
orientated in this example - the PDF has page numbering and margins that
alternate placing depending on whether they would be a left or right
facing printed page. This is so we can produce print-ready PDF source
from FM for integration with print on demand services.

The aim is to use lulu.com (but not exclusively) so that each maintainer
can decide if there is a mark-up on the printed book and use the money
for the further development of the manual. Interesting, for example, for
a team like the Inkscape doc team as they could put a markup on their
print on demand version of their manual and use the money towards more
Book Sprints etc.

The PDF linked above is generated straight from the HTML source with a
few small tag changes which we will have to build into the FM platform.
The CSS that defines the look of the PDF is very simple and elegant (I
have included it below).

Anyways, more news on this soon.

adam





@font-face {
  font-family: GillSans;
  src: url("font/gillsans-regular.ttf");
}

@font-face {
  font-family: GillBold;
  src: url("font/gillsans-bold.ttf");
  font-weight: bold;
}

@font-face {
  font-family: GillItalic;
  src: url("font/gillsans-italic.ttf");
  font-style: italic;
}

@font-face {
  font-family: FuturaHeavy;
  src: url("font/futura-heavy.ttf");
}

fmsection { display: block; page-break-before: right; }

.fmtoc { font-family: FuturaHeavy; font-size: 22pt; }

h0, .h0 { -pdf-outline: true; -pdf-outline-level: 0; font-size: 48pt;
font-family: FuturaHeavy; line-height: 48pt; padding-bottom: 48pt;
display: block; }

h1, h2, h3, h4, h5, h6 { font-family: FuturaHeavy; -pdf-outline: false;
font-size: 12pt; }

h0, h1, h2, .h1, h0 *, h1 *, h2 * { text-transform: uppercase; }

.fminitial { font-family: FuturaHeavy; font-size: 48pt; line-height:
48pt; }

h1 { 
page-break-before: right; 
-pdf-outline: true; -pdf-outline-level: 1; 
font-size: 18pt; line-height: 48pt; 
}

h1.toc {
page-break-before: none;
}

body { font-size: 9.7pt; line-height: 13.5pt; }

p { page-break-inside: avoid; }

p, li, u { font-family: GillSans; }

b, strong, b u, strong u { font-family: FuturaHeavy; }

i { font-family: GillItalic; }

.header { font-family: GillSans; text-align: center; font-size: 10pt;
line-height: 10pt; text-transform: uppercase; }
.footer { font-family: GillSans; text-align: right;  font-size: 10pt;
line-height: 10pt; }
.footerLeft { font-family: GillSans; text-align: left;  font-size: 10pt;
line-height: 10pt; }

img { zoom: 50%; }

@page body {
    size: 168mm 260mm;
    margin-top: 30mm;
    margin-bottom: 20mm;
    margin-left: 20mm;
    margin-right: 12.5mm;

    @frame header {
        -pdf-frame-content: headerContent;
        top: 1cm;
        margin-left: 20mm;
        margin-right: 12.5mm;
        height: 1cm;
    }

    @frame footer {
        -pdf-frame-content: footerContent;
        bottom: 5mm;
        margin-left: 20mm;
        margin-right: 12.5mm;
        height: 1cm;
    }
} 


@page bodyLeft {
    size: 168mm 260mm;
    margin-top: 30mm;
    margin-bottom: 20mm;
    margin-left: 12.5mm;
    margin-right: 20mm;

    @frame header {
        -pdf-frame-content: headerContentLeft;
        top: 1cm;
        margin-left: 12.5mm;
        margin-right: 20mm;
        height: 1cm;
    }

    @frame footer {
        -pdf-frame-content: footerContentLeft;
        bottom: 5mm;
        margin-left: 12.5mm;
        margin-right: 20mm;
        height: 1cm;
    }
} 


pdftoc { font-family: GillSans; }

pdftoc.pdftoclevel0 {
	margin-left: 4cm;
	font-family: FuturaHeavy;
}

pdftoc.pdftoclevel1 {
	margin-left: 5cm;
	text-transform: capitalize;
}

/* breaks pisa
a { font-family: GillSans; } 
b, strong, b u, strong u { font-family: GillBold; }
*/


adam

-- 
Adam Hyde
FLOSS Manuals

http://www.flossmanuals.net
+ 31 6 2808 7108




More information about the Discuss mailing list