Closed marc-medley closed 5 years ago
maybe try some print to pdf code from https://github.com/appcoda/Print2PDF/blob/master/Print2PDF/InvoiceComposer.swift just get the html from Erik
Thanks for the reply.
To clarify a bit, the quest is to find a Swift Package which could work on various platforms including Linux, macOS and iOS. An example Linux use case would be PDF generation backend for Swift based server side frameworks such as Kitura and Vapor
Apple's proprietary, closed source WKWebView API surprisingly does not print on macOS and unsurprisingly is not available on Linux.
So, while there exists some scriptable HTML to PDF possibilities, a more ideal solution would be an open source Swift Package with can generates PDF files from HTML.
In another wording, would Erik
be a candidate to be an open source Swift Package which can generate PDF from HTML that is also portable across any Swift enabled platform? Would such PDF generation make sense as a roadmap feature request?
Erik use WKWebView (if I have time I have project to implement other layout engine like chromium , like selenium use it in python , but no time...)
Can
Erik
be used to generate a PDF file from the rendering of a webpage via either https and/or file url? (preferrably not as a image raster which is then placed into PDF)