SwiftUI: Converting View To PDF - SwiftUI PDF Generator - Xcode 13 - SwiftUI Tutorials
Added 2022-01-22 21:01:45 +0000 UTC
Source For SwiftUI: Converting View To PDF - SwiftUI PDF Generator - Xcode 13 - SwiftUI Tutorials.
Download Code π
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.
Razmig Sarkissian
2023-10-24 14:50:52 +0000 UTC
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?
D Perez
2022-08-24 02:52:18 +0000 UTC
Great app. What is the code that sets the url of the file to be saved in the downloads directory on a device.?
Tom G
2022-05-06 03:24:52 +0000 UTC
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?
Kurt Libby
2022-03-01 15:38:18 +0000 UTC
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! :)
Ronald Steinvorth Berrocal
2022-01-30 06:30:13 +0000 UTC
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?
Michael Schefter
2022-01-26 04:31:06 +0000 UTC
Cool...
Andrej
2022-01-25 17:41:01 +0000 UTC
love this
richy price
2022-01-25 13:07:11 +0000 UTC
You guys are awsome
Dmitriy
2022-01-23 16:52:43 +0000 UTC
Keep up the brilliant work :)
Harry Bruce
2022-01-22 21:39:22 +0000 UTC