All Projects → nyg → HTMLWithImagesToPDF

nyg / HTMLWithImagesToPDF

Licence: BSD-3-Clause license
Generate a PDF from an HTML file containing images (iOS).

Programming Languages

swift
15916 projects
HTML
75241 projects

Projects that are alternatives of or similar to HTMLWithImagesToPDF

QuickWebKit
A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。
Stars: ✭ 29 (-23.68%)
Mutual labels:  wkwebview, uiwebview
Wkcookiewebview
WKWebView with cookie sharing support
Stars: ✭ 171 (+350%)
Mutual labels:  wkwebview
Ios tips
iOS的一些示例,持续更新中:1、AVFoundation 高仿微信相机拍摄和编辑 2、AVFoundation 人脸检测、实时滤镜、音视频编解码、GPUImage框架的使用等音视频相关内容 3、OpenGLES 4、LeetCode算法练习 5、iOS Crash防护和APM监控 6、WKWebView相关的内容 等........
Stars: ✭ 896 (+2257.89%)
Mutual labels:  wkwebview
Ionic Native Http Connection Backend
A solution to CORS issues with Ionic and iOS
Stars: ✭ 142 (+273.68%)
Mutual labels:  wkwebview
Hybridpagekit
A high-performance、high-extensibility、easy integration framework for Hybrid content page. Support most content page types of News App.
Stars: ✭ 1,101 (+2797.37%)
Mutual labels:  wkwebview
Flwebview
WKWebView with UIWebView fallback for iOS.
Stars: ✭ 145 (+281.58%)
Mutual labels:  wkwebview
Jxbwkwebview
An component WebView for iOS base on WKWebView
Stars: ✭ 646 (+1600%)
Mutual labels:  wkwebview
Wkwebviewextension
An extension for WKWebView. Providing menuItems delete 、support protocol 、clear cache of iOS8 and so on.
Stars: ✭ 182 (+378.95%)
Mutual labels:  wkwebview
Pawebview
An component WebView for iOS base on WKWebView
Stars: ✭ 169 (+344.74%)
Mutual labels:  wkwebview
Mybrowser
我的浏览器,基于WKWebView实现的一个iOS浏览器,实现了无图模式、广告拦截、多窗口、扫描二维码、收藏夹/历史、无痕浏览、夜间模式等功能...
Stars: ✭ 127 (+234.21%)
Mutual labels:  wkwebview
Flutter browser app
A Full-Featured Mobile Browser App (such as the Google Chrome mobile browser) created using Flutter and the features offered by the flutter_inappwebview plugin.
Stars: ✭ 85 (+123.68%)
Mutual labels:  wkwebview
Reusablenestingscrollview
An scrollView handler for UIScrollView & WKWebView and other scrollViews. Providing scrollview`s subViews reusable.
Stars: ✭ 61 (+60.53%)
Mutual labels:  wkwebview
Applemusicultra
Music Client for macOS. Upgrade your music experience with themes, styles, custom scripting and more. Uses WebKit and JavaScript.
Stars: ✭ 155 (+307.89%)
Mutual labels:  wkwebview
Wkwebviewjavascriptbridge
🌉 A Bridge for Sending Messages between Swift and JavaScript in WKWebViews.
Stars: ✭ 863 (+2171.05%)
Mutual labels:  wkwebview
Wkwebviewwithurlprotocol
WKWebView With URLProtocol
Stars: ✭ 174 (+357.89%)
Mutual labels:  wkwebview
Tysnapshotscroll
一句代码保存截图,将 UIScrollView UITableView UICollectionView UIWebView WKWebView 网页 保存 为 长图 查看。Save the scroll view page as an image,support UIScrollView,UITableView,UICollectionView,UIWebView,WKWebView.(Support iOS13)
Stars: ✭ 709 (+1765.79%)
Mutual labels:  wkwebview
Flutter inappwebview
A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
Stars: ✭ 1,259 (+3213.16%)
Mutual labels:  wkwebview
Lcwebview
www.strictfrog.com
Stars: ✭ 144 (+278.95%)
Mutual labels:  wkwebview
JsBridge-WebViewJavascriptBridge-Sample
iOS JsBridge Solution by WebViewJavascriptBridge
Stars: ✭ 16 (-57.89%)
Mutual labels:  uiwebview
Rxwebkit
RxWebKit is a RxSwift wrapper for WebKit
Stars: ✭ 176 (+363.16%)
Mutual labels:  wkwebview

HTMLWithImagesToPDF

Description

This app showcases the following:

  1. Loading an HTML file into a web view (actually both a WKWebView and UIWebView),
  2. Generating a PDF using either
    1. the web views' viewPrintFormatter() or
    2. a UIMarkupTextPrintFormatter,
  3. Printing a PDF using either
    1. one of the web views' viewPrintFormatter() or
    2. a UIMarkupTextPrintFormatter

Bug

Generating a PDF using a UIMarkupTextPrintFormatter will not render the images of the HTML file. Unless the HTML code has been loaded into a web view beforehand.

  1. Run the application.
  2. Tap Create PDF and then UIMarkupTextPrintFormatter: a PDF is generated from the index.html file and loaded into both a WKWebView and a UIWebView. Images are not rendered.
  3. Tap Load HTML and then index-img.html: the HTML code is loaded into both web views and the images are displayed. The HTML code is not the same as the one we used to generate our PDF (but the img tags are the same).
  4. Re-do step 1: tap Create PDF and then UIMarkupTextPrintFormatter: another PDF is generated and loaded into the web views. And this time with images.

This behavior tells me that UIMarkupTextPrintFormatter does support img tags. Also confirmed by the fact that Print PDF > UIMarkupTextPrintFormatter shows a PDF with images (actually only one image is displayed).

Note

The Create PDF > WebView.viewPrintFormatter() action creates a PDF from what each web view is currently displaying, that can either be nothing, one of the HTML loaded beforehand or a PDF loaded from a previous execution.

The Create PDF > UIMarkupTextPrintFormatter action always creates the PDF from the index.html file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].