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

Issue with header in PHPWord #2658

Open
2 tasks
Devika1698 opened this issue Aug 23, 2024 · 5 comments
Open
2 tasks

Issue with header in PHPWord #2658

Devika1698 opened this issue Aug 23, 2024 · 5 comments
Labels
Bug Report Status: Waiting for feedback Question has been asked, waiting for response from PR author

Comments

@Devika1698
Copy link

Devika1698 commented Aug 23, 2024

Describe the bug and add attachments

When adding an image as a header, the image gets blurred in the document page.
Screenshot 2024-08-23 172232

Expected behavior

Want the image to be not blurred and should appear as it is in the document page when adding as header also.

Steps to reproduce

  $border_src = file_get_contents(public_path() . '/assets/images/workbook_images/border.png');
 $header = $section->addHeader();
        $header->addImage(
            $border_src,
            [
                'alignment' => 'center',
                'width' => '850',
                'height' => '600',
                'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
                'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
                'posVertical' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
                'marginTop' => -73,
                'wrappingStyle' => 'infront',
                'marginLeft' => -425,
            ]
        );

PHPWord version(s) where the bug happened

^0.18.3

PHP version(s) where the bug happened

^7.3|^8.0

Priority

  • I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)
@Progi1984
Copy link
Member

Progi1984 commented Aug 23, 2024

@Devika1698 Have you got a sample file where the header is not blurred ? And an other sample file where the header is blurred ?
Which writer do you use ?

It's for analysis

@Progi1984 Progi1984 added the Status: Waiting for feedback Question has been asked, waiting for response from PR author label Aug 23, 2024
@Devika1698
Copy link
Author

@Devika1698 Have you got a sample file where the header is not blurred ? And an other sample file where the header is blurred ? Which writer do you use ?

It's for analysis

The image always gets blurred when adding as a header. Please refer the attachment where I have added an image as a border for the page and it is blurred or image colour gets dull. Is there any way to get the original image as a header without blur? I have used PhpWord to generate a document using Laravel framework.

@Progi1984
Copy link
Member

@Devika1698 I would like a MSWord file where the header is not blurred. Have you got a sample file please ?

@Devika1698
Copy link
Author

@Devika1698 I would like a MSWord file where the header is not blurred. Have you got a sample file please ?

I don't have a sample file, and the header is also blurred in MS Word. However, the requirement is to use the original image as the header. Please provide a solution for this.

@Progi1984
Copy link
Member

@Devika1698 It's an open source that I maintain alone on my personal time. So it will be prioritized after PRs and crowdfunded issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Status: Waiting for feedback Question has been asked, waiting for response from PR author
Development

No branches or pull requests

2 participants