RESOLVED FIXED5051
PDFs in HTML pages do not scale
https://bugs.webkit.org/show_bug.cgi?id=5051
Summary PDFs in HTML pages do not scale
Mac-arena the Bored Zo
Reported 2005-09-19 00:46:54 PDT
when the HTML specifies the width and/or height of an img that is a PDF, the image is cropped rather than scaled. (will attach an example.)
Attachments
Example of bug. (6.31 KB, application/x-webarchive)
2005-09-19 00:49 PDT, Mac-arena the Bored Zo
no flags
a working example of the bug (129 bytes, text/plain)
2024-04-26 17:59 PDT, Frances Cornwall
no flags
Mac-arena the Bored Zo
Comment 1 2005-09-19 00:49:04 PDT
Created attachment 3945 [details] Example of bug. a PDF which is 3.5 cm square, shown on the page at 1x and at 5x. instead of scaling the second img to 5x, it simply crops it to this size (showing the PDF at 1x magnification in the lower left of a 5x box).
Andre-John Mas
Comment 2 2006-02-11 08:38:12 PST
Observations: - nightly build of 2006-02-11 does not even show the PDFs, instead showing the broken image symbol, while release version 2.0.3 does. - in Safari 2.0.3 images are misaligned, but not in TextEdit - both TextEdit and Safari show images at the same size without the scaling being applied. - is PDF even considered a web-standard image and would an embed not be more suitable for the data type? BTW would it be possible to save test cases at .zip, so they can be easily be tested with non-webkit based browsers for behaviour comparison?
David Kilzer (:ddkilzer)
Comment 3 2006-02-11 19:51:50 PST
(In reply to comment #2) > - is PDF even considered a web-standard image and would an embed not be more > suitable for the data type? I'm not sure, but with PostScript support recently added (Bug 3527), I wonder if inline PostScript would work as well once this is fixed? > BTW would it be possible to save test cases at .zip, so they can be easily be > tested with non-webkit based browsers for behaviour comparison? If you're asking for a new feature in WebKit similar to Firefox's "Save Web Page (Complete)", I would suggest filing a new bug (with a severity of "enhancement"). Otherwise you'll have to use Firefox today to save the web page that way, then zip it up and post it to this bug.
David Kilzer (:ddkilzer)
Comment 4 2006-02-11 20:11:37 PST
Confirming bug on Safari 2.0.3 (417.8) on Mac OS X 10.4.4. See Bug 7206 for a regression that must be fixed before this one may be fixed.
David Kilzer (:ddkilzer)
Comment 5 2006-02-11 23:34:58 PST
(In reply to comment #3) > If you're asking for a new feature in WebKit similar to Firefox's "Save Web > Page (Complete)", I would suggest filing a new bug (with a severity of > "enhancement"). See Bug 7211.
Dave Hyatt
Comment 6 2006-09-19 03:48:56 PDT
Upping to P1 since the PDF no longer renders and used to.
Dave Hyatt
Comment 7 2006-12-14 22:44:38 PST
Without a working example, I'm not sure what to do here. The attached sample doesn't work.
Stephanie Lewis
Comment 8 2007-01-27 19:21:07 PST
Mark Rowe (bdash)
Comment 9 2007-02-06 23:56:07 PST
The comments suggest this bug is present in Safari 2.0.x, which indicates this is not a regression.
Frances Cornwall
Comment 10 2024-04-26 17:59:24 PDT
Created attachment 471174 [details] a working example of the bug
Frances Cornwall
Comment 11 2024-04-26 18:36:41 PDT
It looks like CSP is blocking inline styles that the PDF Plugin is trying to load in Safari 17.4.1. The bug is not in the mini-browser. It looks like it was fixed by: https://github.com/WebKit/WebKit/pull/27271 and related to bug: https://bugs.webkit.org/show_bug.cgi?id=272689. The PDF Plugin is now not able to scroll in the mini-browser.
Karl Dubost
Comment 12 2024-04-29 19:41:35 PDT
@brandon, do you think this is a duplicate of Bug 272689
Brandon
Comment 13 2024-04-30 07:58:10 PDT
@karl My PDF fix did not fully resolve this issue. The sizing is correct, but the PDF is still not loading with my change (checked in mini browser).
Brandon
Comment 14 2024-04-30 09:58:40 PDT
Downloaded the latest build from https://webkit.org/build-archives/#mac-sonoma-x86_64%20arm64 and the issue doesn't reproduce for me now.
Brandon
Comment 15 2024-04-30 11:17:31 PDT
This should probably be marked as fixed. It was fixed in https://github.com/WebKit/WebKit/pull/27271
Note You need to log in before you can comment on or make changes to this bug.