PDF title page backgorund-image alignment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PDF title page backgorund-image alignment

ascju
Hi all,

I have built a custom style to use for PDF rendering of my documentation.
The title page has two images ... one at the top and one in the center of the title.

title_page:
  align: left
  logo:
    align: front
    image: image:../images/templates/title.png[pdfwidth=65%]
    top: 55%
  background_image: image:../images/templates/title_top.png[pdfwidth=15%]

After reinstalling my laptop (I guess new version of asciidoctor-pdf), the top image (used backround-image for this) is placed also in the center of the title page.

Any idea how to get it back to the top?

Thanks!
Chris
Reply | Threaded
Open this post in threaded view
|

Re: PDF title page backgorund-image alignment

mojavelinux
Administrator
Center alignment is now the default. You can control it using the position attribute. It accepts the same values as the background-position property in CSS.

To place it at the center top, use:

position=top

To place it at the top left, use

position=top left


Cheers,

-Dan

On Thu, Mar 5, 2020 at 9:12 AM ascju [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi all,

I have built a custom style to use for PDF rendering of my documentation.
The title page has two images ... one at the top and one in the center of the title.

title_page:
  align: left
  logo:
    align: hiscale_front
    image: image:../images/templates/title.png[pdfwidth=65%]
    top: 55%
  background_image: image:../images/templates/title_top.png[pdfwidth=15%]

After reinstalling my laptop (I guess new version of asciidoctor-pdf), the top image (used backround-image for this) is placed also in the center of the title page.

Any idea how to get it back to the top?

Thanks!
Chris


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/PDF-title-page-backgorund-image-alignment-tp7726.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: PDF title page backgorund-image alignment

ascju
Works like a charm!
Thank you so much! I really appreciate your work here!