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

Add custom page size option when creating documents #148

Closed
sanderai opened this issue May 19, 2020 · 8 comments · Fixed by #149
Closed

Add custom page size option when creating documents #148

sanderai opened this issue May 19, 2020 · 8 comments · Fixed by #149
Labels
good first issue Good for newcomers help wanted Extra attention is needed new feature New feature or request

Comments

@sanderai
Copy link

Is your feature request related to a problem? Please describe.
Currently Maroto uses only gofpdf.New to create documents with the few predefined page sizes. (A4, A5, Letter etc.)

Describe the solution you'd like
Use gofpdf.NewCustom to allow custom page sizes. Refactor NewMaroto() to accept custom width and height or create a second method for custom documents.

@johnferchermeli johnferchermeli added good first issue Good for newcomers help wanted Extra attention is needed new feature New feature or request labels May 19, 2020
@johnferchermeli
Copy link
Contributor

If the only modification is change gofpdf.New to gofpdf.NewCustom, I think that is only copy & paste the maroto.NewMaroto() code, naming the new constructor as maroto.NewCustom() and change the parameters and the called gofpdf constructor.

@sanderai
Copy link
Author

sanderai commented May 19, 2020

I actually created a fork already and am testing the custom sizing. Will put up a PR soon!

@johnferchermeli
Copy link
Contributor

johnferchermeli commented May 19, 2020

Very good :D, thank you.

@sanderai sanderai mentioned this issue May 19, 2020
8 tasks
@sanderai
Copy link
Author

I don't know how to update the docs (is it automatic based on example files?) so maybe you can help with that. Otherwise all previous tests still pass and the previous method can be used next to this one.

@johnferchermeli
Copy link
Contributor

The docs doesn't have to be updated in every new feature. I will check your PR today =)

@sanderai
Copy link
Author

Thanks for the merge! Is there going to be a release soon as well?

@johnfercher
Copy link
Owner

Released :D

@sanderai
Copy link
Author

Perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants