-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Transparent background in PDF previews #244
Comments
Hi there! Thanks for opening up this issue. This should definitely be a feature so it is possible to set a paper/background color. |
I am thinking about looking further into this and therefore RFC: APIFirst off I would add a property struct PDFDocumentBackground {
var color: Color?
} This allows to add more background alternatives further down the road as they can easily be added next to Example:let document = PDFDocument(format: .a4)
document.set(font: Font.systemFont(ofSize: 12))
document.add(text: "Hello World")
document.background.color = .green // <---- |
Sensible! Looks good to me! |
I created a pull request PR #277. |
I am really interested in this feature, I have tested it and it's working correctly for me 👌 |
@stefanovnt thank you for your feedback! I will go ahead and review the PR once more and merge it soon |
What did you do?
I created a PDFDocument, and rendered it. When the preview was displayed in Mail for macOS, the background was transparent.
What did you expect to happen?
I expected the background to be white, or a a possibility to set a fill coloraturas
What happened instead?
The background was transparent
TPPDF Environment
TPPDF version: 2.3.1 ℹ
Xcode version: 12 ℹ
Swift version: 5 ℹ
Demo Code / Project
The text was updated successfully, but these errors were encountered: