Full size background image on first page in PDF

classic Classic list List threaded Threaded
4 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.