Bug 169439 - [iOS] Add SPI to print to a single tall PDF page
Summary: [iOS] Add SPI to print to a single tall PDF page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-09 13:44 PST by Andy Estes
Modified: 2017-03-09 14:37 PST (History)
2 users (show)

See Also:


Attachments
Patch (9.46 KB, patch)
2017-03-09 13:50 PST, Andy Estes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2017-03-09 13:44:56 PST
[iOS] Add SPI to print to a single tall PDF page
Comment 1 Andy Estes 2017-03-09 13:46:05 PST
rdar://problem/30120532
Comment 2 Andy Estes 2017-03-09 13:50:32 PST
Created attachment 303982 [details]
Patch
Comment 3 Tim Horton 2017-03-09 13:55:26 PST
Comment on attachment 303982 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303982&action=review

> Source/WebKit2/UIProcess/_WKWebViewPrintFormatter.mm:38
> +@interface UIPrintPageRenderer ()
> +@property (nonatomic) CGRect paperRect;
> +@property (nonatomic) CGRect printableRect;
> +@end

Should be in UIKitSPI.

> Source/WebKit2/UIProcess/ios/WKContentView.mm:698
> +        static const CGFloat maximumPDFHeight = 200 * 72; // maximum PDF height for a single page is 200 inches

O... kay. Is that a PDF spec thing, or a CGPDF thing, or what? Can we (at some point) get it from somewhere isntead of hardcoding it?
Comment 4 Andy Estes 2017-03-09 13:56:34 PST
(In reply to comment #3)
> Comment on attachment 303982 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=303982&action=review
> 
> > Source/WebKit2/UIProcess/_WKWebViewPrintFormatter.mm:38
> > +@interface UIPrintPageRenderer ()
> > +@property (nonatomic) CGRect paperRect;
> > +@property (nonatomic) CGRect printableRect;
> > +@end
> 
> Should be in UIKitSPI.

It's not SPI :(

> 
> > Source/WebKit2/UIProcess/ios/WKContentView.mm:698
> > +        static const CGFloat maximumPDFHeight = 200 * 72; // maximum PDF height for a single page is 200 inches
> 
> O... kay. Is that a PDF spec thing, or a CGPDF thing, or what? Can we (at
> some point) get it from somewhere isntead of hardcoding it?

I believe it's a PDF spec thing. I'll investigate whether we can get this elsewhere.
Comment 5 WebKit Commit Bot 2017-03-09 14:37:16 PST
Comment on attachment 303982 [details]
Patch

Clearing flags on attachment: 303982

Committed r213674: <http://trac.webkit.org/changeset/213674>
Comment 6 WebKit Commit Bot 2017-03-09 14:37:20 PST
All reviewed patches have been landed.  Closing bug.