-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Feature/custom page size #149
Feature/custom page size #149
Conversation
Codecov Report
@@ Coverage Diff @@
## master #149 +/- ##
==========================================
+ Coverage 96.24% 96.36% +0.12%
==========================================
Files 9 9
Lines 584 603 +19
==========================================
+ Hits 562 581 +19
Misses 16 16
Partials 6 6
Continue to review full report at Codecov.
|
Strange that the width and height parameters invert when set the landspace orientation. Is this correct? |
Yeah this seems to be the way gofpdf.NewCustom() works. I think the "default" orientation is Portrait and you give the width and height of that. And then when you turn it to landscape, it flips those numbers (as seen in their source). So yes, this is the correct behavior as page dimensions are usually given in portrait orientation. You could theoretically use Portrait input and give a wider width than height and have a "landscape" page that way, but that would be cheating a bit. |
…e-size Feature/custom page size
Description
Adds a new method for creating documents with custom page dimensions. Previous shorthand is preserved and uses the new method internally to avoid duplicate code.
Related Issue
resolves #148
Checklist
func (s *struct) method() {}
name style.go fmt github.com/johnfercher/maroto/...
to format all files