PDF Publishing Template: Starting TOC on odd page repeats cover image

Post here questions and problems related to editing and publishing DITA content.
Frank Ralf
Posts: 512
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

PDF Publishing Template: Starting TOC on odd page repeats cover image

Post by Frank Ralf »

Hi,

In my HTML-based PDF publishing template I have set a background image for the cover page:

Code: Select all

@page front-page {
    background-image: url("us-letter.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}
I also use the following CSS to make the TOC start on an odd page:

Code: Select all

@page table-of-contents{
    -oxy-initial-page-number: auto-odd;
}
The processor should insert a blank page 2 between cover page and TOC. Instead, it repeats the cover page background image. Am I missing something?

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
julien_lacour
Posts: 785
Joined: Wed Oct 16, 2019 3:47 pm

Re: PDF Publishing Template: Starting TOC on odd page repeats cover image

Post by julien_lacour »

Hi Frank,

Actually you are missing a small detail, which is explained in this topic:
Moving the chapter on a specific page number may create blank padding pages at the end of the previous page sequence.
Indeed, a blank page is added, based on the following CSS rules:

Code: Select all

@page :blank{
  @top-left {
    content: none;
  }
  @top-right {
    content: none;
  }
}
But the previous page sequence, which is 'front-page' in this use-case, defines a background-image, which isn't overriden by the blank page definition.
If you remove the background-image for blank pages, using background-image: none, you should get the expected empty page.

Regards,
Julien
Frank Ralf
Posts: 512
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: PDF Publishing Template: Starting TOC on odd page repeats cover image

Post by Frank Ralf »

Hi Julien,

Thanks for the pointer, I suspected something like that. Will try and report back.

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
Post Reply