Image on Title Page

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

Image on Title Page

russurquhart1
Hi,

Is there an approved way of doing this? Someone mentioned something like this:

:title-logo-image: images/titleimage.png

Put at the beginning of the file, near the Author info. I did it, but when i generate a pdf i don't get anything?

Or is this something i have to address via the FO stylesheet?

Thanks,


Russ
Ted
Reply | Threaded
Open this post in threaded view
|

Re: Image on Title Page

Ted
russurquhart1 wrote
:title-logo-image: images/titleimage.png
Russ, that is close. You just need to surround the path to the image with the image:images/titleimage.png[]. Make sure your titleimage.png file is in the images directory

Document.adoc
images
  -- titleimage.png


You can control the image width and alignment by adding these attributes in your Document.adoc file:

:title-logo-image: image:images/titleimage.png[pdfwidth=3.5in,align=center]


If you don't want to mess with a sub-directory, leave it out.

Document.adoc
titleimage.png

:title-logo-image: image:titleimage.png[]


For those that don't know how to create the .pdf use:

> asciidoctor-pdf Document.adoc


- Ted @TedAtCIS
Reply | Threaded
Open this post in threaded view
|

Re: Image on Title Page

russurquhart1
Hi Ted,

I tried this and still no luck.

Here is the first few lines of my asciidoctor book file:

= Brainspace  Discovery API/Services Guide
Russ Urquhart <russur@brainspace.com>
:revnumber: v1.0
:revdate: February 11, 2016
:revremark: Initial Release
:doctype: book
:encoding: utf-8
:lang: en

:title-logo-image: image:Brainspace_Logo.png[]


= Runtime Services

include::Test_aliases.asc[]

I am having asciidoctor create a docbook 5.0 xml and then using asciidoctor-fopub to create the pdf. Is this the correct workflow to use?

Thanks,


Russ
Reply | Threaded
Open this post in threaded view
|

Re: Image on Title Page

russurquhart1
Hi All,

Well i found out that i had to move the like the third line of the file, like the following:

= Brainspace  Discovery API/Services Guide
Russ Urquhart <russur@brainspace.com>
:title-logo-image: image::./images/media/Brainspace_Logo.svg[]
:revnumber: v1.0
:revdate: February 11, 2016
:revremark: Initial Release
:doctype: book
:encoding: utf-8
:lang: en

and for asciidoctor-pdf this worked.

WIth default parameters for asciidoctor, however, this didn't work. Do i need to set certain parameters to get this to work for standard asciidoctor?

Thanks,


Russ
Reply | Threaded
Open this post in threaded view
|

Re: Image on Title Page

mojavelinux
Administrator
In reply to this post by russurquhart1

On Fri, Feb 12, 2016 at 11:38 AM, russurquhart1 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
= Brainspace  Discovery API/Services Guide
Russ Urquhart <[hidden email]>
:revnumber: v1.0
:revdate: February 11, 2016
:revremark: Initial Release
:doctype: book
:encoding: utf-8
:lang: en

:title-logo-image: image:Brainspace_Logo.png[]

The problem here is that you are putting a blank line in your header. The header of the document cannot have any blank lines. And the title-logo-image must be a header attribute.

-Dan


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Image on Title Page

mojavelinux
Administrator
In reply to this post by russurquhart1

On Thu, Feb 11, 2016 at 12:40 PM, russurquhart1 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Or is this something i have to address via the FO stylesheet?

FO is not part of the Asciidoctor PDF toolchain. That only comes into play if you are using fopub (or a2x). The whole idea of Asciidoctor PDF is to get away from FO (and the DocBook toolchain in general).

-Dan


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Image on Title Page

mojavelinux
Administrator
In reply to this post by russurquhart1

On Sat, Feb 13, 2016 at 1:07 PM, russurquhart1 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
and for asciidoctor-pdf this worked.

WIth default parameters for asciidoctor, however, this didn't work. Do i need to set certain parameters to get this to work for standard asciidoctor?

Exactly as expected. The title page logo image only applies to Asciidoctor PDF. If you want a logo in the HTML file, you need to customize the document template {1} (or use CSS to place it).

-Dan