Re: exporting images in RTF from runrev
Hey guys, I've had a wonderful experience creating RTFD files that are visible (images too) in both TextEdit and Pages. TextEdit being the default application, but opening nicely from within Pages. The documents, some as large as 60 MB were created from a brand new TextEdit file into which I pasted text and screen shots I had taken from a Windows app that I was running on XP under Fusion. I don't remember at what point, but I'm pretty sure that after having pasted a shot into TextEdit that, the next time I saved, I was asked if I wanted to save it in RTFD format, to which I said yes. Altogether I have a dozen or more of these files, totally some 700 MB, and they have continued to work beautifully. I recall having copied one of them to paste into a RR field to see if it worked. It did, but I don't recall whether it pasted both text and images in the same operation or not. I'll have to try that out. I just did, and I was unable to paste into a RR field, but probably could have created a new image and pasted into it, but would not have been in the same scrolling path as it is in both TextEdit and Pages. So... TextEdit really impressed me with how it handled this whole operation. Particularly with the size of the files. Joe Wilkins On Nov 25, 2008, at 10:56 PM, Trevor DeVore wrote: On Nov 25, 2008, at 9:08 PM, Ken Ray wrote: Thanks for that, Franz! I've been able to *reference* images on disk with RTF, but wasn't sure how to *embed* them! I'm really interested in this as well. The only problem is that the RTF files don't display the image in TextEdit or Pages on Mac or in WordPad on Windows. I can only see the image in Word on OS X (I don't have Word for Windows). What other programs can see images in RTF files? Regards, -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Developer Resources: http://revolution.bluemangolearning.co ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: exporting images in RTF from runrev
Ken Ray wrote: Some users could not confirm my problems with bigger jpegs in return. I've encountered this - there's a maximum limit to the size of an image object in Rev - I've successfully gotten to 4000 x 4000 pixels, but if it's too large you get an error in attempting to import the image into Rev. Not sure of the exact maximum though... There is a bug in Rev, on Mac only, which fails to import an image with _width_ 4091 pixels (greater height is fine). It's a real PITA. What makes it worse is that it doesn't throw an error, it just produces a corrupt result. http://quality.runrev.com/qacenter/show_bug.cgi?id=4026 I really wish RR would kick this one up the attention list. We're starting to rebuild tools in other languages that we already have working in RR, because of the combination of this issue and the fact that since some versions ago, image processing became ludicrously slow. - Ben ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
exporting images in RTF from runrev
Hello, rtf seems to be a dead end when you look to the new xml docx and openoffice formats, but of course will live longer than expectable. As posted some weeks ago under the title function binaryDecode within a function ... - the following script does basic image export in rtf: function image2rtf objektname export image objektname of group inhalt to bilddaten as JPEG -- for testing: export image 1 to bilddaten as JPEG get binaryDecode(H*,bilddaten,timage) put {\rtf{\pict\jpegblip\picwgoal874\pichgoal1121 cr into header put cr } cr } into footer put header timage footer into rtf put rtf into URL binfile:c:/rtftest.rtf -- this works fine return rtf -- this only works with small jpgs, do not know why end image2rtf Some users could not confirm my problems with bigger jpegs in return. P.S. I have very good results with exporting to HTML and opening in Word 2007. You must give the width and height of images in the html-Text for word to set the right rectangle - but thats the same in rtf. Regards, Franz Böhmisch Original Messageprocessed by David InfoCenter Subject: Re: Jan Schenkel's merge tutorials (24-Nov-2008 14:51) From:Phil Jimmieson [EMAIL PROTECTED] To: [EMAIL PROTECTED] On 21 Nov 2008, at 18:16, J. Landman Gay wrote: Peter Alcibiades wrote: Jan, many thanks - great tutorials, very illuminating. I have to agree, I was thunderstruck. Jan, a Word export would be perfect for my current project, but I need to know how to incorporate images into the rtf file. Do you know how, or do I have to do my own research? Would sure appreciate any tips you may have. I'd love to be able to export reports as Word-compatible RTF - complete with images. I've requested that feature in the quality centre: http://quality.runrev.com/qacenter/show_bug.cgi?id=4231 The ideal would be if Rev could save the images as RTF directly, alternatively, if the RTFText could at least contain a reference or comment to say that an image is present, that would be useful (then I'd have to roll my own image to RTF code). At the moment, there's no sign in the RTF at all that there are images in the field. -- Phil Jimmieson [EMAIL PROTECTED] (UK) 0151 795 4236 Computer Science Dept., Liverpool University, Ashton Building, Ashton Street Liverpool L69 3BX http://www.csc.liv.ac.uk/~phil/ I used to sit on a special medical board... ...but now I use this ointment. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution To: use-revolution@lists.runrev.com___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: exporting images in RTF from runrev
Thanks for that, Franz! I've been able to *reference* images on disk with RTF, but wasn't sure how to *embed* them! It took your code, abstracted it a bit, and adapted it slightly to accept optional width, height and format (in case anyone cares if it's JPEG vs PNG) - watch line wraps: on mouseUp put imageToRTF(long id of img 1,,,png) into tRawRTF ask file Save RTF as: if it then writeRTFDoc tRawRTF,it end if end mouseUp on writeRTFDoc pRawRTF,pFileName put {\rtf pRawRTF cr } into tRTF if the platform is MacOS then set the fileType to MSWDRTF put tRTF into url (binfile: pFileName) put the result into tResult if tResult then return Error: tResult end writeRTFDoc function imageToRTF pImageRef,pOpt_Width,pOpt_Height,pOpt_Format local tData,tImageBinary,tW,tH if exists(pImageRef) then if (pOpt_Format=) or (pOpt_Format is not among the items of jpeg,png) then put jpeg into tFormat else put toLower(pOpt_Format) into tFormat do export pImageRef to tData as tFormat get binaryDecode(H*,tData,tImageBinary) if pOpt_Width = then put the width of pImageRef into tW else put pOpt_Width into tW if pOpt_Height = then put the height of pImageRef into tH else put pOpt_Height into tH put (tW * 1440) into tW -- convert pixels to twips put (tH * 1440) into tH -- convert pixels to twips put {\pict\ tFormat blip\picwgoal tW \ \pichgoal tH cr tImageBinary cr \ } into tRetVal return tRetVal else return Error: Image ' pImageRef ' does not exist. end if end imageToRTF Some users could not confirm my problems with bigger jpegs in return. I've encountered this - there's a maximum limit to the size of an image object in Rev - I've successfully gotten to 4000 x 4000 pixels, but if it's too large you get an error in attempting to import the image into Rev. Not sure of the exact maximum though... Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: exporting images in RTF from runrev
On Nov 25, 2008, at 9:08 PM, Ken Ray wrote: Thanks for that, Franz! I've been able to *reference* images on disk with RTF, but wasn't sure how to *embed* them! I'm really interested in this as well. The only problem is that the RTF files don't display the image in TextEdit or Pages on Mac or in WordPad on Windows. I can only see the image in Word on OS X (I don't have Word for Windows). What other programs can see images in RTF files? Regards, -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Developer Resources: http://revolution.bluemangolearning.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution