[R] pstoedit

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Wed Apr 13 14:44:13 CEST 2005


On 13-Apr-05 Prof Brian Ripley wrote:
> On Wed, 13 Apr 2005 Ted.Harding at nessie.mcc.ac.uk wrote:
> 
>> On 13-Apr-05 Prof Brian Ripley wrote:
>>> On Wed, 13 Apr 2005, BORGULYA [iso-8859-2] Gábor wrote:
>>>
>>>>    Has onyone experience with "pstoedit"
>>>>    (http://www.pstoedit.net/pstoedit)
>>>> to convert eps graphs generated by R on Linux to Windows
>>>> formats (WMF or EMF)? Does this way work? Is there an other,
>>>> better way?
>>>
>>> You can only do that using pstoedit on Windows.
>>>                                      ^^^^^^^^^^
>>
>> Well, I have pstoedit on Linux and with
>>
>>  pstoedit -f emf infile.eps outfile.emf
>>
>> I get what is claimed to be "Enhanced Windows metafile"
>> and which can be imported into Word (though then it is
>> subsequently somewhat resistant to editing operations,
>> such as rotating if it's the wrong way up).
> 
> Maybe, but the URL quoted says
> 
> pstoedit 3.40
> 
># Windows Meta Files (WMF) (Windows 9x/NT only)
># Enhanced Windows Meta Files (EMF) (Windows 9x/NT only)
> 
> so the quoted URL claims otherwise for the current version.

Indeed, on the face of it. My version is 3.33 (the predecessor
of 3.4), and it does produce both WMF and EMF files (even if
Windows does not like the WMF files, though able to accept
the EMF files).

However, if from that site (above) you go to the changelog you
can read, under Version 3.40 (changed from 3.33):

#  disabled the WMF driver when libemf is used
   (all non-Windows systems). Libemf does not really
   handle WMF files. A CreateMetaFile effectively
   creates an EnhMetaFile - but that confuses programs
   which expect an real WMF file in a file with a .wmf suffix.

# added a workaround in the EMF driver for a bug/problem in
  the libemf which is used under *nix for EMF generation.
  The problem in libemf is that if text is rendered using the
  simple TextOut function call the resulting EMF file is no
  longer usable under newer versions of Windows.
  For more details see the description of the -nfw option of
  the wmf format driver.

This suggests that while WMF has been disabled for pstoedit
on non-Windows systems, the EMF driver should still work.

However, having only 3.33 at the moment I can't test the above.

However, for others interested it may be worth a try.

(The first "#" also contains a possible explanation why the
".wmf" file I made with the WMF driver wasn't read by Windows:
if it's really an EMF files carrying a ".wmf" filename extension,
and the ".wmf" leads Windows to expect WMF content rather than
the EMF content it really has, then this could happen; but
it didn't like it either when explicitly asked to import it
as an EMF, nor when the extension was changed to ".emf")

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 13-Apr-05                                       Time: 13:44:13
------------------------------ XFMail ------------------------------




More information about the R-help mailing list