Fitting PDF cover image

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

Fitting PDF cover image

mremond
Hello,

I have a cover image that is sized for epub and mobi (1050x1600)

I cannot get the PDF cover to be full page. I always get some white margin on left and right.

Any idea what I could do ?

I tried to add fit=cover to the front cover image attribute but it does not change anything.

I am using asciidoctorp-pdf 1.5.0.beta.8

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

Re: Fitting PDF cover image

mojavelinux
Administrator
The cover page can be scaled to cover the entire page (edge to edge) using the fit=cover attribute. Here's a test can you reference to see an example:


If that does not work for you, please provide a link to the image so that I am able to test it.

Best,

-Dan

On Wed, Nov 27, 2019 at 3:45 AM mremond [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I have a cover image that is sized for epub and mobi (1050x1600)

I cannot get the PDF cover to be full page. I always get some white margin on left and right.

Any idea what I could do ?

I tried to add fit=cover to the front cover image attribute but it does not change anything.

I am using asciidoctorp-pdf 1.5.0.beta.8

Thanks !


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Fitting-PDF-cover-image-tp7373.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: Fitting PDF cover image

mremond
Hi,

Many thanks for your feedback.
I am using this image: https://www.dropbox.com/s/o10yylc4i7lp3un/cover.png?dl=0

With this directive:
:front-cover-image: image:cover.png[width=1050,height=1600,fit=cover]


It does not seems to work in latest version (but renders fines in '1.5.0.alpha.16', event without fit=cover).

I hope this helps,

-- Mickaël
Reply | Threaded
Open this post in threaded view
|

Re: Fitting PDF cover image

mojavelinux
Administrator
I suggested the wrong value. What you're looking for is fit=fill. That matches the previous behavior of scaling the image to fit the size of the page. That should get you on your way.

fit=cover should be scaling the image up until it covers the page entirely, but it's not currently doing that. I'll look into it.

Best,

-Dan

On Thu, Nov 28, 2019 at 6:00 AM mremond [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

Many thanks for your feedback.
I am using this image: https://www.dropbox.com/s/o10yylc4i7lp3un/cover.png?dl=0

With this directive:
:front-cover-image: image:cover.png[width=1050,height=1600,fit=cover]


It does not seems to work in latest version (but renders fines in '1.5.0.alpha.16', event without fit=cover).

I hope this helps,

-- Mickaël


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Fitting-PDF-cover-image-tp7373p7379.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