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

control the size of an image in a TPPDF cell table #251

Open
chepiok opened this issue Nov 26, 2020 · 2 comments
Open

control the size of an image in a TPPDF cell table #251

chepiok opened this issue Nov 26, 2020 · 2 comments

Comments

@chepiok
Copy link
Contributor

chepiok commented Nov 26, 2020

ℹ 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
Copy link

bcbeta commented Jul 8, 2021

Even when I resize the UIImage, the image size and cell height doesn't change. Any work arounds for this issue?

@brendand
Copy link
Contributor

Pull request #320 should now allow you to control the size of images in the table cells.

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

No branches or pull requests

4 participants