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

How to control page margin of PDF export #804

Closed
MattStrauss opened this issue May 25, 2016 · 4 comments
Closed

How to control page margin of PDF export #804

MattStrauss opened this issue May 25, 2016 · 4 comments

Comments

@MattStrauss
Copy link

Question - How to control PDF page margins when using ->export('pdf')

Package version - 2.0, Laravel version- 5.1(using laravel-dompdf version 0.6)

Expected behaviour - Expect the PDF to follow the page margin settings of Laravel-Excel

Actual behaviour - PDF exports via Laravel-Excel (->export('pdf')) do not use Laravel-Excel page margins parameters

The PDF export functionality works great except that I can't set/control the page margins. Is there anyway to set the PDF page margins from within the Laravel-Excel methods? I can control the PDF margins when creating a PDF directly, without Laravel-Excel, but in many cases we use the Laravel-Excel to create the desired output and then simply export it to a PDF as that seems to be the users preference (as opposed to as CSV or Excel sheet).

@Zwaen91
Copy link

Zwaen91 commented Aug 17, 2017

+1

1 similar comment
@schmitz85
Copy link

+1

@mu-hasan
Copy link

is already any way to solve this one?

@patrickbrouwers
Copy link
Member

https://phpspreadsheet.readthedocs.io/en/latest/topics/recipes/

Using events you can set it with phpspreadsheet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants