Page 1 of 1

Chapter First Page -- Big Logo and Big Top Margin

Posted: Wed Sep 05, 2018 6:00 pm
by cud
Hi all... I'm sure this is a regular use case, and I should be able to figure it out, but I've been at it for a few hours and don't find anything.

Often, a first page in a chapter includes a large logo or some other special formatting. In these cases, it also includes maybe the top 1/3 as white space, and the content starts below. The following is the closest I've gotten:

Code: Select all

@page chapter:first:left:header, chapter:first:right:header {
height: 100em;
}
@page chapter:first, chapter:first {
@top-left {
content: " ";
background-image: url('img/turbonomic-blackChapterPage.png');
background-repeat:no-repeat;
background-position:50% 50%;
}
}
But that doesn't do what I need. The header height doesn't change, and the image doesn't fully display. I get the feeling I'm going about this from the wrong angle???

Sorry to be a slug, and thanks! (Almost there with my first PDF project -- Release Notes!)

Re: Chapter First Page -- Big Logo and Big Top Margin

Posted: Fri Sep 07, 2018 10:00 am
by Dan
The "top-left-corner", "top-left", "top-center", "top-right", "top-right-corner" are all placed in the top margin of your page. (See https://www.oxygenxml.com/doc/versions/ ... tting.html, the "Page Margin Boxes" section.)

You should increase the top margin of your page, like this:

Code: Select all


@page chapter:first:left, chapter:first:right{
margin-top: 300pt;

@top-left {
content: " ";
background-image: url('img/turbonomic-blackChapterPage.png');
background-repeat:no-repeat;
background-position:50% 50%;
}
}
Many regards,
Dan

Re: Chapter First Page -- Big Logo and Big Top Margin

Posted: Fri Sep 07, 2018 2:26 pm
by cud
Most wonderful, and lots of thanks. You have gotten me off the ground, and we should be on our way moving our PDF production over to this CSS method.