PDF data from a WebFrameView with background images and screen CSS
PDF data from a WebFrameView with background images and screen CSS
- Subject: PDF data from a WebFrameView with background images and screen CSS
- From: Andreas Kummer <email@hidden>
- Date: Fri, 3 Dec 2004 14:30:04 +0100
Hi list,
I'm trying to export the content of a WebFrameView's document view as
PDF data.
I thought that using the dataWithPDFInsideRect: method (inherited from
NSView) would do the job but the output I receive has several "flaws":
1.) Any background image of the web content is stripped (page
background and/or html table backgrounds).
2.) The CSS print media type (which most web pages are lacking) is
applied to the content - instead of the CSS screen media type which is
used when rendering the WebView on screen.
NSPrintOperation's PDFOperationWithView:insideRect:toData:printInfo:
yields the same result.
The only thing bringing me close to what I want is locking focus on a
newly created NSImage and subsequently drawing the document view. From
this image I can get a TIFFRepresentation which can be converted to PDF
of course.
However, the resulting PDF output is rasterized bitmap data and not the
scalable form (sequence of drawing commands) I'm seeking. - So, this is
not a good solution either.
Any ideas on how to get a better PDF representation from a
WebFrameView's document view?
I searched the archives but to no avail.
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden