Bug 169439

Summary: [iOS] Add SPI to print to a single tall PDF page
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.