Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No margin with absolute Positioning in Office 2013 #481

Open
Holt59 opened this issue Feb 18, 2015 · 1 comment
Open

No margin with absolute Positioning in Office 2013 #481

Holt59 opened this issue Feb 18, 2015 · 1 comment

Comments

@Holt59
Copy link

Holt59 commented Feb 18, 2015

marginTop, marginLeft (and I guess the 2 other ones) have no effect when using absolute positioning:

$textrun->addLine(
    array(
        'width'       => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(1),
        'height'      => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(0),
        'positioning'      => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
        'posHorizontal'    => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_LEFT,
        'posHorizontalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_COLUMN,
        'posVerticalRel'   => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_LINE,
        'marginLeft'       => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(10),
        'marginTop'        => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(8),
    )
);

Same with image... This seems to work when I create .odt file and open with word 2013, but this is not working when I generate .docx file.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 18, 2022
@Progi1984 Progi1984 removed the Stale label Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants