You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ℹ 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.
What did you do?
I added a banner image to the document's .headerLeft and a table in the .headerLeft. The table has an Image to the left and Text to the right of the image.
I expected to see the full image and text beneath the banner image. Instead, there's a gap between the banner image and table below, with the top of the table cut off.
What happened instead?
TPPDF Environment
TPPDF version: 2.5.3 Xcode version: 14.2 Swift version: 5.7
So I discovered if I make a small change to the TPPDF framework code, the table in the header lines up. I still don't know what's causing the gap between the header banner image and the table in the header. I would think there should be no gap and the whole header should be a bit shorter.
On line 62 of PDFTableObject.swift, I added 10 to that line's y parameter:
I don't know why it solves the problem at the moment, but it does. I still think the position of the table is too low. Or at least I should be able to control the gap between the table and the header image.
It would seem that the table top is getting cut off because I have style.columHeaderCount = 0. So it seems the code expects every PDFTable to have a header. In this case I'm using a PDFTable simply to draw an icon to the left of the text.
Is there a better way to do that inside the header? I tried with an attributed string and an NSTextAttachment, but it got stripped out when the PDF was generated.
What did you do?
I added a banner image to the document's
.headerLeft
and a table in the.headerLeft
. The table has an Image to the left and Text to the right of the image.What did you expect to happen?
I expected to see the full image and text beneath the banner image. Instead, there's a gap between the banner image and table below, with the top of the table cut off.
What happened instead?
TPPDF Environment
TPPDF version: 2.5.3
Xcode version: 14.2
Swift version: 5.7
Demo Code / Project
From the TableExampleFactory.swift file:
and here's the banner image I added to the project for testing purposes.
The text was updated successfully, but these errors were encountered: