0
私は現在、ページの上部に以下のコードを含む画像を持っています。コードにmarginTop=> 200
を追加してイメージの位置を下げたいが、それはうまくいかない。実際、私は知っているすべてを試しましたが、すべてが失敗しました。誰かがどのようにphpwordのヘッダー内の画像の位置を変更する方法を知っていますか?phpwordヘッダーの画像の位置を変更する方法
$header = $section->addHeader();
$header->firstPage();
$header->addImage(
'../images/logo/AVA-Full-Logo-Grey.jpg',
array(
'width' => 250,
'wrappingStyle' => 'square',
'marginTop' => 200,
'positioning' => 'relative',
'posHorizontal' => PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_RIGHT,
'posHorizontalRel' => 'margin',
'posVerticalRel' => 'line',
)
);
をこの答えは役立つかもしれない、それは持っていないので、私は重複としてマークしたくありませんでした受け入れられた答え。 https://stackoverflow.com/questions/29651259/phpword-insert-page-break-and-set-margin-and-page-orientation-using-laravel-4ドキュメントから、正しい方法で作業しているように見えますが、 http://phpword.readthedocs.io/ja/latest/elements.html#images、おそらく何かがスタイルをオーバーライドしています。 – ArtisticPhoenix