penkzhou / plugin_html_to_pdf

Flutter plugin for generating PDF files from HTML
https://pub.dev/packages/html_to_pdf
MIT License
5 stars 2 forks source link

Fix - links clickable on iOS #6

Closed tsafundzic closed 4 months ago

tsafundzic commented 5 months ago

UIMarkupTextPrintFormatter is used to make all links clickable in generated pdf on iOS platform. But, this cause additional change - by using UIMarkupTextPrintFormatter - images must be set as data base64:

<img src="data:image/jpeg;base64,$imageData" />

Because of that, the boolean flag linksClickable is added in PrintPdfConfiguration. If it is true, UIMarkupTextPrintFormatter is used. If it is false (by default it is false) - printing is the same as current implementation.