Titles with borders for pdf

Hi, does anybody know if it’s possible to add borders to chapter titles when compiling to pdf?

I have done it when compiling to ebook:

but have only got this far compiling to pdf:

I’m using the ‘Chapter Title’ section layout:

Many thanks,

The ebooks appear to get their border from the custom CSS:

/* Amend title to have lines above and below */ .bordered-title { margin-left: 10%; margin-right: 10%; border-top: 1px solid black; padding-top: 12px; border-bottom: 1px solid black; padding-bottom: 12px; }

As custom CSS is not available for PDF output, I assume it isn’t possible to do what you want to do.

A workaround would be to output to an editable format, such as RTF, and style in another application before creating the PDF.

Thanks for your suggestion - I had a feeling it wouldn’t be possible from Scrivener - just wanted to ask.

Yes, I added the style to the custom.css file for my ebook styling.

Many thanks,

You could accomplish this using underscores in the title prefix and suffix. You’d need to experiment with the number of underscores required to go all the way across the page, and you’d need to ensure the formatting of the prefix and suffix complement one another (and are centred). But for instance, here’s a quick test I did:


Ah, thanks for that! I’ll give it a go. :slight_smile: