Page 1 of 1

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

Posted: Wed Mar 11, 2026 4:37 pm
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

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

Posted: Wed Mar 11, 2026 5:00 pm
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

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

Posted: Wed Mar 11, 2026 5:45 pm
by Frank Ralf
Hi Julien,

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

Best regards,
Frank