Skip to content

Transparent background in PDF previews #244

@audungk

Description

@audungk

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

let document = PDFDocument(format: .a4)
document.set(font: Font.systemFont(ofSize: 12))
document.add(text: "Hello World")
let generator = PDFGenerator(document: document)
do {
    return try generator.generateURL(filename: "Utlånserklæring.pdf")
} catch {
    print(error)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementmerged-for-releaseIssue is merged into develop branch to be included in next release

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions