Patrefans
kavsoft from patreon
kavsoft patreon

SwiftUI: Converting View To PDF - SwiftUI PDF Generator - Xcode 13 - SwiftUI Tutorials

🕑 Added 2022-01-22 21:01:45 +0000 UTC
SwiftUI: Converting View To PDF - SwiftUI PDF Generator - Xcode 13 - SwiftUI Tutorials

Comments

Razmig Sarkissian

on iOS 17, with Xcode 15, the app freezes when trying to export in PDF the search view with any number of elements. It's working when empty.

D Perez

I am getting a lot of info out of this tutorial! Thanks for making this available and saving me a tremendous amount of time and more importantly mental pain. One question, I have implemented this but it is saving to the pdf the calling view. How do I make it call any view?

Tom G

Great app. What is the code that sets the url of the file to be saved in the downloads directory on a device.?

Kurt Libby

I tried this, but the PDF isn't showing some of the data that is shown in the SwiftUI View. Here is what is happening: https://www.dropbox.com/s/8xz5fmfigkfvy3m/Simulator%20Screen%20Recording%20-%20iPhone%2012%20Pro%20-%202022-03-01%20at%2009.41.05.mp4?dl=0 Any ideas?

Ronald Steinvorth Berrocal

Hi. I used this approach to print a VIEW to PDF but its not printing portions that VIEW that use UITextView like TextEditors. (It prints everything like TextFields, Texts but not the UITextViews) if they are defined with a .frame() or a .fixedsize() Do you know how to fix this? I really appreciate a reply. Im really thankful for your work! :)

Michael Schefter

Thanks you very much. I was doing it with UIGraphicsPDFRenderer because I need paging. But there it is also not easy. I create an array of Items with images or text and have to figure if the next item will fit on the current Page. If not create a new one with .beginPage(). You know, like for Invoices. How would you handle the paging with the SwiftUI solution?

Andrej

Cool...

richy price

love this

Dmitriy

You guys are awsome

Harry Bruce

Keep up the brilliant work :)


More Creators