Creating PDFs on MacOS without UIKit

Greetings,
this may be an odd question but I was not able to find an answer to this.
So I am developing this pure MacOS program for a client and one thing he wants is to create some PDFs along the way. Great chance I thought to try out this fancy Swift 5 with SwiftUI and so far it's going great, most of the program is up and running but I've hit a wall with the PDF generation, which I thought would be one of the easiest parts.
Since it's a pure MacOS program, UIKit is not available but there is not a single tutorial out there for generating PDFs which is not using UIKit to do it. It seems people only want to create PDFs on iOS.
Can someone give me a small breakdown or starter or tutorial or skeleton on how I would do that?
Thanks and have a nice day

PDFKit is available in macOS 10.4+. Here's the first tutorial I found Create PDF view programmatically using PDFKit in swift. - Mobikul

FYI, Apple platform development questions should be directed to Apple Developer Forums

1 Like

This page of documentation probably has what you're looking for: Apple Developer Documentation

Additionally, when you ask this question on Apple Developer Forums, it might help if you provide some details of what you're trying to create a PDF from.

Hey, I have found this tutorial, it is for iOS, not MacOS. I had no idea, I am new here. It just said newbie questions welcome