Full size background image on first page in PDF

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

Full size background image on first page in PDF

Norbert
Well, I guess that the title says it all: I want to set a full width and height background image to my title page for a ün Asciidoctor PDF output.
Is this possible? I found mixed hints in the docs and played around with so many options that I really lost overview.
A Tipp would be appreciated.
Thanks
Norbert
Reply | Threaded
Open this post in threaded view
|

Re: Full size background image on first page in PDF

1marc1
Norbert,

Simply create an image that spans the full width and height of your paper size and use that as the background image for the title page.

Marc.
Reply | Threaded
Open this post in threaded view
|

Re: Full size background image on first page in PDF

Norbert
I tried that,. But the image is printed with margins. I need it to go from edge to edge.
Reply | Threaded
Open this post in threaded view
|

Re: Full size background image on first page in PDF

1marc1
Norbert,

I just added some blue bars to the title page of a tutorial document I am writing (Bay View Property Holdings and Sigma IT Services are both fictitious companies) and here is the result inside Acrobat:



The source of the background image is a PNG file, which I created in GIMP. Here is a screenshot of what it looks like in GIMP:



The dimensions of the image are 2480 x 3508 (300 dpi on A4 portrait). Below is the actual background image (PNG format) that I used to create the document. Apologies for the huge size, but that is how it comes out: you may need to scroll down a little to see the whole thing.



Here are the details of the reference in the theme file:

title_page:
  align: center
  #background_color: transparent
  background_image: image:norbert.png[]
  font_color: $blue
  font_family: Free Sans
  #font_size: $heading_h1_font_size
  #font_style:       # <(inherit)> | normal | italic | bold | bold_italic
  #text_transform:   # <$heading_text_transform> | uppercase | lowercase | none (clears inherited value)
  #line_height: 1.15

Marc.
Reply | Threaded
Open this post in threaded view
|

Re: Full size background image on first page in PDF

ggenier
Hello,

I try your solution but still my image did not appear.

In my adoc file I have at begining :
:author: Test
:email:  Test
:revdate: 27 janvier 2020
:revnumber: 0.3
:linkcss:
:title-page:
:title-page-background-image: image:./cover_page2.png[]

In my yml file I have :
title_page:
  align: center
  background_image: image:cover_page2.png[]
  title:
    top: 25%
    font_color: CF022B
    line_height: 0.9
    font_family: Century Gothic
    font_size: 30

I try with or without background_image in title_page it is same.

I try to put my image in = Title section, image no appears

I try :front-cover-image: image:cover_page2.png[], and it almost works. I have image in a page but without my title.

I want my title in my image in first page.

I check example from repo, but I think it missed some file (may be adoc or yml)

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Full size background image on first page in PDF

mojavelinux
Administrator
The title page will not be created if the document does not have a title. You need to include one using:

= Document Title
:author: Test
:email:  Test
:revdate: 27 janvier 2020
:revnumber: 0.3
:linkcss:
:title-page:
:title-page-background-image: image:./cover_page2.png[]

document body

Please make sure you are using 1.5.0.rc.2. If you are getting any warnings, please report those.

Best,

-Dan

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

Re: Full size background image on first page in PDF

ggenier
Hello,

Thank you very much, it a version problem.