Skip to content

Add PDFImage with PDFAttributedText .left, .center, .right #356

Description

@AlexLojewski

What did you do?

document.add(.contentLeft, image: PDFImage(
    image: CameraImageManager.loadImageFromDiskWith(
        fileName: damageReport.imageName
    )!,
    caption: PDFAttributedText(text: NSAttributedString(
        string: damageReport.descriptionText, 
        attributes: nil
    )), 
    size: CGSize(width: 200, height: 165), 
    quality: 0.85, 
    options: .none, 
    cornerRadius: .none
))

What did you expect to happen?

The image is on the left and the specified text is either on the left under the image or centered under the image

What happened instead?

The image is on the left and the text is centered on the page.

Bildschirmfoto 2023-12-15 um 12 20 47

TPPDF Environment

TPPDF version: 2.4.1
Xcode version: Version 15.1 (15C65)
Swift version: 5.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions