Skip to content

Releases: coenttb/swift-html-to-pdf

0.4.0

06 Mar 08:43
Compare
Choose a tag to compare

This release makes several key improvements to the PDF generation functionality:

  • Refactor WebViewPool using Dependencies framework and a proper Swift actor
    to better handle concurrency and resource sharing
  • Fix the task processing in PDF generation to properly run tasks concurrently
    instead of waiting for each one to complete
  • Add proper error handling and resource cleanup in WebView operations
  • Improve test reliability with better cleanup and verification
  • Add documentation about WebKit process assertion warnings in README

These changes fix issues with concurrent PDF processing where tests would hang
or fail when generating multiple PDFs simultaneously. The actor-based approach
provides better isolation and safer state management for the WebView pool.

Technical details:

  • Added swift-dependencies package for dependency injection
  • Created WebViewPoolActor with proper isolation and continuation handling
  • Fixed resource leaks by ensuring WebView release in error cases
  • Added explanation for WebKit assertion warnings in non-UI contexts

Full Changelog: 0.3.0...0.4.0

0.3.0

08 Sep 20:19
d4bcfc6
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.2.1...0.3.0

0.2.1

02 Sep 07:27
Compare
Choose a tag to compare

Full Changelog: 0.2.0...0.2.1

0.2.0

18 Jul 15:05
Compare
Choose a tag to compare

Introducing overloads that return an AsyncSequence that yield the URL of each printed PDF. This enable asynchronous handling of each PDF’s creation, allowing immediate processing of each file’s URL as it’s generated. This is useful for tasks like uploading, logging, or further processing, enhancing efficiency and scalability when dealing with multiple PDFs.

Full Changelog: 0.1.6...0.2.0

0.1.6

17 Jul 16:22
Compare
Choose a tag to compare

Full Changelog: 0.1.5...0.1.6

0.1.5

17 Jul 15:24
Compare
Choose a tag to compare

Updated documentation.
Full Changelog: 0.1.4...0.1.5

0.1.4

17 Jul 13:27
Compare
Choose a tag to compare

Fixed: improved [Document].print to ensure it completes successfully. Tests are all passing, also repeatedly.

Full Changelog: 0.1.3...0.1.4

0.1.3

16 Jul 18:36
Compare
Choose a tag to compare

Pagination

FIX: WKWebView.createPDF(...) does not do pagination. Therefore, we fall back to NSPrintOperation for MacOS and UIPrintPageRenderer for iOS.

Known Issue:

  • Tests are passing individually, but when run at the same time, they seem to hang.

Full Changelog: 0.1.2...0.1.3

0.1.2

16 Jul 10:27
Compare
Choose a tag to compare

Full Changelog: 0.1.1...0.1.2

0.1.1

16 Jul 10:12
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.1.0...0.1.1