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

[quality revision][quality revision]
(Tag: 2017 source edit)

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:
                    /*PDF Book book or PDF with subpages - no page breaks between chapters*/
.bs-page-content, .bs-page-content.booklevel-1, .bs-page-content.booklevel-2 
{page- { page-break-after: avoid; page-break-before: avoid;}

                
If you want to start the main chapters on separate pages, use this code instead:
                    /* multi-page PDF breaksPDF book or PDF with subpages - page break only after eachchapter mainlevl chapter1 */
.bs-page-content { page-break-after: avoid; }
.bs-page-content.booklevel-1 { page-break-before: avoidalways; }

                

You can add further chapter levels as needed:

                    /*PDF book or PDF with subpages - page breaks after chapter levels 1 and 2*/
.bs-page-content.booklevel-1 { page-break-beforeafter: alwaysavoid; }
.bs-page-content.booklevel-1, .bs-page-content.booklevel-2 { page-break-afterbefore: always; }

                

Note: These settings apply both to the PDF output of books and to the PDF export which includes linked pages or subpages of a wiki page.

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">
        
        /*PDF Book book or PDF with subpages - no page breaks  between chapters*/
        
        .bs-page-content, .bs-page-content.booklevel-1, .bs-page-content.booklevel-2 
            
            {page-break-after: avoid; page-break-before: avoid; { page-break-after: avoid; }
        
        
        </syntaxhighlight>If you want to start the main chapters on separate pages, use this code instead:<syntaxhighlight lang="css">
        
        /* multi-page PDF breaks after each main chapterPDF book or PDF with subpages - page break only after chapter levl 1 */
        
        .bs-page-content { page-break-after: avoid; }
            
            .bs-page-break-before: avoid; }
            
            .bs-page-content.booklevel-1 { page-break-before: always; page-break-after: always; }
            
            
            </syntaxhighlight>content.booklevel-1 { page-break-before: always; }
            
            
            </syntaxhighlight>
            
            
            
            You can add further chapter levels as needed:
            
            
            
            
            <syntaxhighlight lang="css">
            
            /*PDF book or PDF with subpages - 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>
            
            
            
            
        {{Box Note|boxtype=note|Note text=These settings apply both to the PDF output of books and to the PDF export which includes linked pages or subpages of a wiki page.|bgcolor=}}
        
        [[Category:Customization]]
        
        
        
        [[en:{{FULLPAGENAME}}]]
        
        [[de: Handbuch:Erweiterung/BlueSpiceBookshelf/PDF_Ausgabe_anpassen]]
Line 4: Line 4:
  
 
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">
/*PDF Book - no page breaks */
+
/*PDF book or PDF with subpages - no page breaks between chapters*/
.bs-page-content, .bs-page-content.booklevel-1, .bs-page-content.booklevel-2
+
.bs-page-content { page-break-after: avoid; }
{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">
 
</syntaxhighlight>If you want to start the main chapters on separate pages, use this code instead:<syntaxhighlight lang="css">
/* multi-page PDF breaks after each main chapter */
+
/*PDF book or PDF with subpages - page break only after chapter levl 1 */
.bs-page-content { page-break-after: avoid; page-break-before: avoid; }
+
.bs-page-content { page-break-after: avoid; }
.bs-page-content.booklevel-1 { page-break-before: always; page-break-after: always; }
+
.bs-page-content.booklevel-1 { page-break-before: always; }
</syntaxhighlight>{{Box Note|boxtype=note|Note text=These settings apply both to the PDF output of books and to the PDF export which includes linked pages or subpages of a wiki page.|bgcolor=}}
+
</syntaxhighlight>
 +
 
 +
You can add further chapter levels as needed:
 +
 
 +
<syntaxhighlight lang="css">
 +
/*PDF book or PDF with subpages - 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>
 +
 
 +
{{Box Note|boxtype=note|Note text=These settings apply both to the PDF output of books and to the PDF export which includes linked pages or subpages of a wiki page.|bgcolor=}}
 
[[Category:Customization]]
 
[[Category:Customization]]
  
 
[[en:{{FULLPAGENAME}}]]
 
[[en:{{FULLPAGENAME}}]]
 
[[de: Handbuch:Erweiterung/BlueSpiceBookshelf/PDF_Ausgabe_anpassen]]
 
[[de: Handbuch:Erweiterung/BlueSpiceBookshelf/PDF_Ausgabe_anpassen]]

Attachments

Discussions