Re: File Conversion Using Cocoa
Re: File Conversion Using Cocoa
- Subject: Re: File Conversion Using Cocoa
- From: "I. Savant" <email@hidden>
- Date: Tue, 15 Sep 2009 12:09:39 -0400
On Sep 15, 2009, at 9:53 AM, Ramesh P wrote:
I would like to convert pdf, doc files to html files using Cocoa?
Please help me in this.
If you want more specific information, break your problem down into
steps. "How do I write this application?" is an unreasonably-broad
question.
In general: there's no direct way to do this while preserving
images and layout exactly. You're probably best off using PDFKit to
parse the PDF document (and get its text runs and images). For .doc
files, you're best to load them with the Cocoa text system and parse
them that way (I don't know how images are handled in this case). You
can then convert the data you've parsed into HTML as you wish. Again,
I don't think there's a way to exactly preserve the formatting in
either case, given the complexities and wide-open possibilities of
both formats.
See also: http://catb.org/~esr/faqs/smart-questions.html
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden