SamSuka
kavsoft
kavsoft

patreon


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

Source For SwiftUI: Converting View To PDF - SwiftUI PDF Generator - Xcode 13 - SwiftUI Tutorials.


Download Code 👇

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

Comments

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

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

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

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

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

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

Cool...

Andrej

love this

richy price

You guys are awsome

Dmitriy

Keep up the brilliant work :)

Harry Bruce


More Creators