-
Notifications
You must be signed in to change notification settings - Fork 87
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
Creator tablecell div image support #179
Conversation
} | ||
return p.getTextWidth() / 1000.0 | ||
} | ||
|
||
// Height returns the height of the Paragraph. The height is calculated based on the input text and how it is wrapped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with period as godoc style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it does end with a period (sentence is continued in following line), see
unidoc/pdf/creator/paragraph.go
Line 201 in d5fc69b
// within the container. Does not include Margins. |
pdf/creator/table.go
Outdated
@@ -208,7 +210,50 @@ func (table *Table) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, | |||
// Add diff to last row |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with period as godoc style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not so important within function (does not go into godoc), but sure will fix as this is a sentence and is more consistent.
pdf/creator/table.go
Outdated
newh := img.Height() + img.margins.top + img.margins.bottom | ||
if newh > h { | ||
diffh := newh - h | ||
// Add diff to last row |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with period as godoc style.
pdf/creator/table.go
Outdated
newh := ctx.Height - h | ||
if newh > h { | ||
diffh := newh - h | ||
// Add diff to last row |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with period as godoc style.
pdf/creator/table.go
Outdated
// Relative mode. | ||
// Move back X after. | ||
ctx.X = origCtx.X | ||
// Return original width |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with period as godoc style.
pdf/creator/table.go
Outdated
ctx.X = origCtx.X | ||
// Return original width | ||
ctx.Width = origCtx.Width | ||
// Add the bottom margin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with period as godoc style.
pdf/creator/table_test.go
Outdated
|
||
pageHistoryTable.SkipCells(1) | ||
|
||
// Add image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with period as godoc style.
pdf/creator/table_test.go
Outdated
|
||
pageHistoryTable.SkipCells(1) | ||
|
||
// Add image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with period as godoc style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor changes required on comments.
New Division container component for containing multiple Drawables and can wrap across pages (unlike Block). Can be used in table cells to contain multiple paragraphs with different styles.
Support added for Division and Image in table cell.