Chapter First Page -- Big Logo and Big Top Margin

Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
cud
Posts: 46
Joined: Fri Oct 06, 2017 5:22 pm

Chapter First Page -- Big Logo and Big Top Margin

Post 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!)
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

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

Post 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
cud
Posts: 46
Joined: Fri Oct 06, 2017 5:22 pm

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

Post 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.
Post Reply