Difference between revisions of "Manual:Extension/BlueSpiceBookshelf/Customized PDF Output"

[quality revision][quality revision]
 


How to adjust page breaks in multi-page PDFs.

Adjusting page breaks[edit | edit source]

By default, each chapter and sub-chapter in a Book-PDF is started on a new page. To avoid these page breaks and to create a continuous chapter flow, an administrator can add the following code to the page MediaWiki:Common.css:
                    .bs-page-content, .bs-page-content.booklevel-1, /*PDF book  - no page breaks between chapters*/
.bs-page-content.booklevel-2 { {page-break-after: avoid; page-break-before: avoid;}

                
If you want to start the main chapters on separate pages, use this code instead:
                    /*PDF book  - page break only after chapter levl 1 */
.bs-page-content.booklevel-2 { {page-break-after: avoid; }
.bs-page-content.booklevel-1 { page-break-before: avoidalways; }

                

You can add further chapter levels as needed:

                    /*PDF book - page breaks after chapter levels 1 and 2*/
.bs-page-content,  { page-break-after: avoid; }
.bs-page-content.booklevel-1, {.bs-page-break-after: avoid;content.booklevel-2 { page-break-before: avoidalways; }

                
{{DISPLAYTITLE:Customized PDF Output}}
            
            
            
            
        How to adjust page breaks in multi-page PDFs.
        
        
        
        ==Adjusting page breaks==
        
        
        
        By default, each chapter and sub-chapter in a Book-PDF is started on a new page. To avoid these page breaks and to create a continuous chapter flow,  an administrator can add the following code to the page MediaWiki:Common.css:<syntaxhighlight lang="css">
        
        
        .bs-page-content, .bs-page-content.booklevel-1, .bs-page-content.booklevel-2 
            
            {/*PDF book  - no page breaks between chapters*/
            
            .bs-page-content { page-break-after: avoid; page-break-before: avoid;}
        
        
        </syntaxhighlight>If you want to start the main chapters on separate pages, use this code instead:<syntaxhighlight lang="css">
        
        
        .bs-page-content.booklevel-2 
            
            {/*PDF book  - page break only after chapter levl 1 */
            
            .bs-page-content { page-break-after: avoid; }
            
            .bs-page-break-before: avoid;}
            
            
            
            .bs-page-content, content.booklevel-1 { page-break-before: always; }
            
            
            </syntaxhighlight>
            
            
            
            You can add further chapter levels as needed:
            
            
            
            
            <syntaxhighlight lang="css">
            
            /*PDF book - page breaks after chapter levels 1 and 2*/
            
            .bs-page-content { page-break-after: avoid; }
            
            
        .bs-page-content.booklevel-1
            
            {, .bs-page-break-after: avoid;content.booklevel-2 { page-break-before: avoid;always; }
        
        
        </syntaxhighlight>
        
        [[Category:Customization]]
            
            
            
            [[en:{{FULLPAGENAME}}]]
            
            [[de: Handbuch:Erweiterung/BlueSpiceBookshelf/PDF_Ausgabe_anpassen]]
            
            [[Category:CSS]]
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:Customized PDF Output}}
 +
 
How to adjust page breaks in multi-page PDFs.
 
How to adjust page breaks in multi-page PDFs.
  
Line 4: Line 6:
  
 
By default, each chapter and sub-chapter in a Book-PDF is started on a new page. To avoid these page breaks and to create a continuous chapter flow,  an administrator can add the following code to the page MediaWiki:Common.css:<syntaxhighlight lang="css">
 
By default, each chapter and sub-chapter in a Book-PDF is started on a new page. To avoid these page breaks and to create a continuous chapter flow,  an administrator can add the following code to the page MediaWiki:Common.css:<syntaxhighlight lang="css">
.bs-page-content, .bs-page-content.booklevel-1, .bs-page-content.booklevel-2
+
/*PDF book  - no page breaks between chapters*/
{page-break-after: avoid; page-break-before: avoid;}
+
.bs-page-content { page-break-after: avoid; }
 
</syntaxhighlight>If you want to start the main chapters on separate pages, use this code instead:<syntaxhighlight lang="css">
 
</syntaxhighlight>If you want to start the main chapters on separate pages, use this code instead:<syntaxhighlight lang="css">
.bs-page-content.booklevel-2
+
/*PDF book  - page break only after chapter levl 1 */
{page-break-after: avoid; page-break-before: avoid;}
+
.bs-page-content { page-break-after: avoid; }
 +
.bs-page-content.booklevel-1 { page-break-before: always; }
 +
</syntaxhighlight>
 +
 
 +
You can add further chapter levels as needed:
  
.bs-page-content, .bs-page-content.booklevel-1
+
<syntaxhighlight lang="css">
{page-break-after: avoid; page-break-before: avoid;}
+
/*PDF book - page breaks after chapter levels 1 and 2*/
 +
.bs-page-content { page-break-after: avoid; }
 +
.bs-page-content.booklevel-1, .bs-page-content.booklevel-2 { page-break-before: always; }
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[Category:Customization]]
 
[[Category:Customization]]
 +
 +
[[en:{{FULLPAGENAME}}]]
 +
[[de: Handbuch:Erweiterung/BlueSpiceBookshelf/PDF_Ausgabe_anpassen]]
 +
[[Category:CSS]]

Attachments

Discussions