Re: Converting RTFD to Word with embedded images
We were all put on this Earth to accomplish a certain number of things during our lifetimes and right now I am so far behind I am never going to die. ;-) On Jul 15, 2013, at 12:28 PM, Scott Ribe wrote: > On Jul 15, 2013, at 12:41 PM, Buddy Kurz wrote: > >> I was trying to avoid learning about the insides of a Word document. > > Good move. Doing that would probably take the rest of your life. Seriously. > > -- > Scott Ribe > scott_r...@elevated-dev.com > http://www.elevated-dev.com/ > (303) 722-0567 voice > > > > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Converting RTFD to Word with embedded images
On Jul 15, 2013, at 12:41 PM, Buddy Kurz wrote: > I was trying to avoid learning about the insides of a Word document. Good move. Doing that would probably take the rest of your life. Seriously. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Converting RTFD to Word with embedded images
I have no problem with the RTFD format. The document is a bundle containing TXT.rtf and any attachment files. The attachments are referenced in the rtf file with {\NeXTGraphic …} tags. I am creating the documents I am trying to convert by starting with RTF and adding the graphics. I was trying to avoid learning about the insides of a Word document. I would rather leverage existing APIs if they exist. thanks... On Jul 15, 2013, at 10:52 AM, Jeffrey Oleander wrote: > > On 2013 Jul 15, at 13:06, Kyle Sluder wrote: > >> On Jul 15, 2013, at 8:59 AM, Buddy Kurz wrote: >> >>> >>> Pages can export to Word with the attachment. Why can't I? >> >> Pages probably doesn't use NSString's Word exporter. >> >> What happens if you use TextEdit? > > What is RTFD format? It's a directory, with an RTF file with references to > the image files in its extended rtf tags, isn't it? (Sometimes I suddenly > find an old, untouched RTFD "file" that doesn't want to open up in TextEdit > as rtfd anymore, i.e. the images are no longer recognized as embedded.) > Anyway, rtf tags are fairly simple to humanly read and figure out, though > it's not really a "standard". Then the trick becomes parsing out how MSFT > does it when you save one of their files with embedded images as rtf... or > are they calling it rtfx or some such, now? Make your "file" be "the same" > and MSFT should import it. > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/buddykurz%40mac.com > > This email sent to buddyk...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Converting RTFD to Word with embedded images
textEdit only allows Rich Text Format with Attachments or Web Archive when there is an image in the document. That could suggest that this is not supported. I am hoping that is not the case. On Jul 15, 2013, at 10:06 AM, Kyle Sluder wrote: > On Jul 15, 2013, at 8:59 AM, Buddy Kurz wrote: > >> >> Pages can export to Word with the attachment. Why can't I? > > Pages probably doesn't use NSString's Word exporter. > > What happens if you use TextEdit? > > --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Converting RTFD to Word with embedded images
On 2013 Jul 15, at 13:06, Kyle Sluder wrote: On Jul 15, 2013, at 8:59 AM, Buddy Kurz wrote: Pages can export to Word with the attachment. Why can't I? Pages probably doesn't use NSString's Word exporter. What happens if you use TextEdit? What is RTFD format? It's a directory, with an RTF file with references to the image files in its extended rtf tags, isn't it? (Sometimes I suddenly find an old, untouched RTFD "file" that doesn't want to open up in TextEdit as rtfd anymore, i.e. the images are no longer recognized as embedded.) Anyway, rtf tags are fairly simple to humanly read and figure out, though it's not really a "standard". Then the trick becomes parsing out how MSFT does it when you save one of their files with embedded images as rtf... or are they calling it rtfx or some such, now? Make your "file" be "the same" and MSFT should import it. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Converting RTFD to Word with embedded images
On Jul 15, 2013, at 8:59 AM, Buddy Kurz wrote: > > Pages can export to Word with the attachment. Why can't I? Pages probably doesn't use NSString's Word exporter. What happens if you use TextEdit? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Converting RTFD to Word with embedded images
I am trying to find the magic incantation to take an .RTFD document with a jpg attachment and convert it to a .DOC document. (in code) My first lazy thought was to use textutil -convert doc mydocument.rtfd This does not work. (10.7.5) It creates a perfect good Word document without the image. Then I tried creating an instance of NSAttributedString using initWith RTFDFileWrapper. The resulting string contains an NSFileAttachment for my jpg image as I would expect. The next step is to save the NSAttributed string, with attachment, as a .doc document. using -docFormatFromRange:documentAttributes: and saving the resulting NSData object created a perfectly good Word document without the attachment. using -fileWrapperFromRange:documentAttributes:error and saving the result also creates a perfectly good Word document, again without the attachment. BOOL written = [destWrapper writeToURL:destURL options:NSFileWrapperWritingWithNameUpdating originalContentsURL:sourceURL error:&writeError]; Am I missing something? Pages can export to Word with the attachment. Why can't I? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com