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:
                    /*PDF Book - no page breaks  */
.bs-page-content, .bs-page-content.booklevel-1, .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:
                    /* multi-page PDF breaks after each main chapter */
.bs-page-content.booklevel-2 { {page-break-after: avoid; page-break-before: avoid; }

.bs-page-content, .bs-page-content.booklevel-1 { page-break-afterbefore: avoidalways; page-break-beforeafter: avoidalways; }

                
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 - no page breaks  */
            
            
        .bs-page-content, .bs-page-content.booklevel-1, .bs-page-content.booklevel-2 
        
        {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 
            
            {/* multi-page PDF breaks after each main chapter */
            
            .bs-page-content { page-break-after: avoid; page-break-before: avoid;}
            
            
            
            
         }
            
            
        .bs-page-content, .bs-page-content.booklevel-1
            
            {page-break-after: avoid; page-break-before: avoid;.booklevel-1 { page-break-before: always; page-break-after: always; }
        
        
        </syntaxhighlight>
        
        [[Category:Customization]]
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  */
 
.bs-page-content, .bs-page-content.booklevel-1, .bs-page-content.booklevel-2  
 
.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; 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">
.bs-page-content.booklevel-2
+
/* multi-page PDF breaks after each main chapter */
{page-break-after: avoid; page-break-before: avoid;}
+
.bs-page-content { page-break-after: avoid; page-break-before: avoid; }
 
+
.bs-page-content.booklevel-1 { page-break-before: always; page-break-after: always; }
.bs-page-content, .bs-page-content.booklevel-1
 
{page-break-after: avoid; page-break-before: avoid;}
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[Category:Customization]]
 
[[Category:Customization]]

Attachments

Discussions