sgr-ksmt / PDFGenerator

A simple generator of PDF written in Swift.
MIT License
755 stars 110 forks source link

After generate pdf from tableview, tableview disappears. #90

Open wiliam-toney opened 6 years ago

wiliam-toney commented 6 years ago

var pdfData: Data! do { let view = PDFPage.view(self.tableView) pdfData = try PDFGenerator.generated(by: [view]) } catch let error { self.showAlert(withTitle: "PDF Gererator Error", withMessage: error.localizedDescription, okayButton: "OK", onCompletion: nil) print(error) }

This is my code. After this i am presenting UIPrintInteractionController to print the pdf. When i am back and try again to generate pdf from this tableview, then tableview disappears forever. Any help would be appreciate.

kikukiran commented 6 years ago

Hi even I am facing something similar to this, When trying to render a view as pdf from ContainerViewController, after the pdf is generated the view is becoming blank, did you find any solution?

jmsargent9 commented 6 years ago

Having similar issue with UIVIew that has many subviews. PDF renders perfectly but screws up all my constraints in the superview. Wish I was smart enough to fix this :(

ghost commented 5 years ago

I am having that same issue, did anyone find a solution?

dhaneshgosai commented 5 years ago

Hello,

I also facing the same issue but with scroll view while call generate method my scroll view lost its constrains.

Any Idea how to solve that ?