{"id":38776,"date":"2023-03-15T14:32:45","date_gmt":"2023-03-15T18:32:45","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=38776"},"modified":"2023-03-15T14:33:57","modified_gmt":"2023-03-15T18:33:57","slug":"printing-lazy-web-images","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/03\/15\/printing-lazy-web-images\/","title":{"rendered":"Printing Lazy Web Images"},"content":{"rendered":"<p><a href=\"https:\/\/tidbits.com\/2023\/03\/13\/quirky-tidbits-issue-printing-problem-solved\/\">Adam Engst<\/a>:<\/p>\n<blockquote cite=\"https:\/\/tidbits.com\/2023\/03\/13\/quirky-tidbits-issue-printing-problem-solved\/\">\n<p>Mail generates an offscreen web view, waits for the &ldquo;load&rdquo; part of the document to arrive, and then &ldquo;prints.&rdquo; But <code>loading=\"lazy\"<\/code> causes images to load only when scrolled into view, which never happens with printing.<\/p>\n<p>[&#8230;]<\/p>\n<p>I did testing and found that if I changed the scaling percentage to 99%, some images would load&mdash;but they&rsquo;d be fuzzy&mdash;and others would remain blank. However, if I changed the scaling percentage more seriously, such as to 87%, and then scrolled through the entire document preview, all images would appear crisply in the resulting PDF, even if I later returned the scaling to 100%. Presumably, asking the Print dialog to scale the output forced WebKit to load all the images, allowing them to appear.<\/p>\n<\/blockquote>\n<p>This is a longstanding problem that also affects pages saved as PDFs from Safari and third-party apps. WebKit should just handle loading the whole page automatically.<\/p>","protected":false},"excerpt":{"rendered":"<p>Adam Engst: Mail generates an offscreen web view, waits for the &ldquo;load&rdquo; part of the document to arrive, and then &ldquo;prints.&rdquo; But loading=\"lazy\" causes images to load only when scrolled into view, which never happens with printing. [&#8230;] I did testing and found that if I changed the scaling percentage to 99%, some images would [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-03-15T18:32:49Z","apple_news_api_id":"048b6593-8164-4067-b021-3e1a71611b8b","apple_news_api_modified_at":"2023-03-15T18:33:59Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/ABItlk4FkQGewIT4acWEbiw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[126,30,2223,345,695,103,96,328],"class_list":["post-38776","post","type-post","status-publish","format-standard","hentry","category-technology","tag-applemail","tag-mac","tag-macos-13-ventura","tag-pdf","tag-printing","tag-safari","tag-web","tag-webkit"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=38776"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38776\/revisions"}],"predecessor-version":[{"id":38782,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38776\/revisions\/38782"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=38776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=38776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=38776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}