control the size of an image in a TPPDF cell table
chepiok opened this issue · 2 comments
chepiok commented
ℹ Please fill out this template when filing an issue.
All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.Feature request should extend the framework. If you found a bug, please issue a Bug Report
How should the feature work?
I'm able to add an image and set its size in a container with:
let imageWork = UIImage(named: "calendarWork")!
let logoImage = PDFImage(image: imageWork, size: CGSize(width: 14, height: 14))
document.add(.contentLeft, image: logoImage)
Now I want to put an image in a table cell and set its size. But when I do:
let imageWork = UIImage(named: "calendarWork")!
table[row: 0].content = [imageWork, imageWork, imageWork]
The image is too big and fill the cell size. It should be nice to control the size of an image inside a cell.
TPPDF Environment
TPPDF version: 2.3.1
Xcode version: 12.2
Swift version: 5
bcbeta commented
Even when I resize the UIImage, the image size and cell height doesn't change. Any work arounds for this issue?