Manual:Extension/PDFCreator/Custom cover sheets/Cover variation 2: Difference between revisions

m (username removed) (log details removed)
No edit summary
 
Line 1: Line 1:
For instructions on how to customize PDF cover sheets, read [[Manual:Extension/PDFCreator/Custom cover sheets|PDFCreator/Custom cover]] sheets.
For instructions on how to customize PDF cover sheets, read [[Manual:Extension/PDFCreator/Custom cover sheets|PDFCreator/Custom cover]] sheets.


== Cover style ==
This style centers the logo, book-title and book-subtitle vertically. Images are shown in their full height.
[[File:PDFCreator Custom cover sheet var2.png|alt=Cover with background image and vertically centered logo, book title and book subtitle with a full size backround iamge of a forest.|center|thumb|496x496px|''Cover style'']]
Go to the page ''MediaWiki:PDFCreator'' and select your template. Then add the below content to the appropriate tabs.


The necessary HTML/CSS
=== Cover sheet layout ===
'''Replace''' the content of the tab ''Document preface'' with the following content:<syntaxhighlight lang="html">
<div class="pdfcreator-intro">
    <div class="pdfcreator-intro-logo">{{{logo}}}</div>
    <div class="pdfcreator-intro-title">{{{book-title}}}
        <div class="pdfcreator-intro-subtitle">{{{book-subtitle}}}</div>
        <!--<div class="pdfcreator-intro-text">
            <div>Adress line 1</div>
            <div>Adress line 2</div>
            <div>City, State</div>
            <div>More contact info</div>
        </div>-->
</div>
</div>
</syntaxhighlight>This layout already has some additional hidden area for additional intro-text, but it is commented out.
 
=== CSS rules ===
In addition, '''append''' the following CSS rules to the [[Manual:Extension/PDFCreator/Standard styles|standard content of the ''Styles'' tab]]:<syntaxhighlight lang="css">
/*Custom cover sheet styles*/
 
.pdfcreator-type-intro {
background-color: #3E5389; /*only visible if no cover-image is available */
background-position:center 0;
background-size:100% auto;
max-height:29.7cm;
    overflow:hidden;
}
 
.pdfcreator-intro-logo {
position: absolute;
padding: 0.3cm 1.75cm;
width: 21cm;
top:12.5cm;
max-height: 2.6cm;
overflow: hidden;
background-color: #ffffff;
}
 
.pdfcreator-intro-title {
top: 14cm;
left: 0cm;
padding:1cm 1.75cm;
width:21cm;
background:#ffffff;
opacity:0.3;
font-size: 32px;
color: #3E5389;
font-weight: 800;
line-height: 1.5em;
}
 
.pdfcreator-intro-subtitle {
    display:block;
font-size: 18px;
color: #3E5389;
font-weight: 600;
line-height: 1.3em;
margin-top:0.5cm;
}
 
.pdfcreator-intro-text {
    padding-top:2cm;
font-size: 14px;
font-weight: 600;
line-height: 1.3em;
width: 17.5cm;
 
}
</syntaxhighlight>

Latest revision as of 14:02, 21 October 2025


For instructions on how to customize PDF cover sheets, read PDFCreator/Custom cover sheets.

Cover style

This style centers the logo, book-title and book-subtitle vertically. Images are shown in their full height.

Cover with background image and vertically centered logo, book title and book subtitle with a full size backround iamge of a forest.
Cover style

Go to the page MediaWiki:PDFCreator and select your template. Then add the below content to the appropriate tabs.

Cover sheet layout

Replace the content of the tab Document preface with the following content:

<div class="pdfcreator-intro">
    <div class="pdfcreator-intro-logo">{{{logo}}}</div>
    <div class="pdfcreator-intro-title">{{{book-title}}}
        <div class="pdfcreator-intro-subtitle">{{{book-subtitle}}}</div>
        <!--<div class="pdfcreator-intro-text">
            <div>Adress line 1</div>
            <div>Adress line 2</div>
            <div>City, State</div>
            <div>More contact info</div>
        </div>-->
	</div>
</div>

This layout already has some additional hidden area for additional intro-text, but it is commented out.

CSS rules

In addition, append the following CSS rules to the standard content of the Styles tab:

/*Custom cover sheet styles*/

.pdfcreator-type-intro {
	background-color: #3E5389; /*only visible if no cover-image is available */
	background-position:center 0; 
	background-size:100% auto;
	max-height:29.7cm;
    overflow:hidden; 
}

.pdfcreator-intro-logo {
	position: absolute;
	padding: 0.3cm 1.75cm;
	width: 21cm;
	top:12.5cm;
	max-height: 2.6cm;
	overflow: hidden;
	background-color: #ffffff;
}

.pdfcreator-intro-title {
	top: 14cm;
	left: 0cm;
	padding:1cm 1.75cm;
	width:21cm;
	background:#ffffff;
	opacity:0.3;
	font-size: 32px;
	color: #3E5389;
	font-weight: 800;
	line-height: 1.5em;
}

.pdfcreator-intro-subtitle {
    display:block;
	font-size: 18px;
	color: #3E5389;
	font-weight: 600;
	line-height: 1.3em;
	margin-top:0.5cm;
}

.pdfcreator-intro-text {
    padding-top:2cm;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3em;
	width: 17.5cm;

}



PDF exclude - start

To submit feedback about this documentation, visit our community forum.

PDF exclude - end