phantommagick icon indicating copy to clipboard operation
phantommagick copied to clipboard

zoom factor can't lower

Open raistie opened this issue 8 years ago • 4 comments

zoom factor can't go lower than 1, this is important because the one html page keeps taking up two pdf pages

raistie avatar Apr 01 '16 09:04 raistie

@raistie By default zoom factor is 1. If you need to change the zoom factor, you have to set pdf options. For example:

$options = [
  'format' => 'A4',
  'zoomfactor' => 0.25,
  'orientation' => 'portrait',
  'margin' => '1cm'
];

Converter::make('http://google.com')
    ->pdfOptions($options)
    ->toPdf()
    ->download('google.pdf');

*More info: * https://github.com/anam-hossain/phantommagick#zoomfactor http://phantomjs.org/api/webpage/property/zoom-factor.html

anam-hossain avatar Apr 04 '16 00:04 anam-hossain

Thank you. I've set the zoom factor to less than 1 but nothing changes.

On 4 Apr 2016, at 08:09, Anam Hossain [email protected] wrote:

@raistie By default zoom factor is 1. If you need to change the zoom factor, you have to set pdf options. For example:

$options = [ 'format' => 'A4', 'zoomfactor' => 0.25, 'orientation' => 'portrait', 'margin' => '1cm' ];

Converter::make('http://google.com') ->pdfOptions($options) ->toPdf() ->download('google.pdf'); *More info: * https://github.com/anam-hossain/phantommagick#zoomfactor http://phantomjs.org/api/webpage/property/zoom-factor.html

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

raistie avatar Apr 04 '16 00:04 raistie

Facing the same problem. Is there any fix on this?

littlewall avatar Aug 30 '16 23:08 littlewall

Facing the same problem. Is there any updates on this?

akbaras avatar Jul 29 '19 09:07 akbaras