Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't create in-memory paginated PDF based on WebView, but I think I'm close



I sent this to cocoa-dev last night (sorry if it is a dupe for anyone) but
it has not gotten a response yet. Any help is appricated. Thanks.

--

In my app I am generating HTML and want to create a PDF based on the
rendering of it. I'm using a WebView (currently on screen but will probably
be off screen once I've gotten this working since the user is never meant to
see a webview, only the resulting PDF).

After lots of searching (list archives, Google, and so on) I have gotten
some code working that will create a PDF file that is properly paginated,
but in my case I want the PDF in memory not on disk.

My code (with a branch to create a file as well as a in memory) can be seen
here:

http://paste.lisp.org/display/18505

The project itself can be found here:

http://mikezornek.com/temp/WebViewToPdf.zip

The problem I am experiencing with the code branch to create an in memory
PDF is that it is generating one really long continuous page (when looking
at mikezornek.com for example).

I was hoping the WebView would be able to paginate by itself. I am also a
web developer and I know there are CSS attributes out there that help
control printing so I am a little hesitant to manually cut out pages since
I'd like to honor any Print CSS that is being used in the HTML.

Any help or suggestion welcome. Thank you.

~ Mike
-- 
Work: http://ClickableBliss.com
Play: http://MikeZornek.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.