Re: Set PDF document title property
Posted by
Hoplop on
Oct 24, 2019; 10:52am
URL: https://discuss.asciidoctor.org/Set-PDF-document-title-property-tp7273p7282.html
Back then i didn't realize that title tag of PDF is set to first section title . I was not using document title at all, i skipped the line
= Document title
The thing is that i create separate .adoc with all settings and include it in beginning of my main document. I set cover page and everything in
settings.adoc. Purpose of that is to be able to set same settings in several files.
Then, when i set title in main document just before settings include:
= Document title
include::settings.adoc[]
== Section 1
...
=== Subsection 1.1
...
i get some errors and PDF was generated in strange way: Document title was insert several times in document, before each heading of level 1 (==). So i decided not using document title at all, and only yesterday i realized that metadata title is set to first section title.
Now i tried to set settings about cover page in main file, not in "settings.adoc", like this:
= Document title
:notitle:
:front-cover-image: image:resources/pdf/themes/main-theme/title-page.png[]
include::settings.adoc[]
== Section 1
...
=== Subsection 1.1
...
And it all worked! Yay!