[R] Lattice + Word: Changing .wmf files to .pdf files
mike.prager at noaa.gov
Thu Jun 5 15:38:29 CEST 2008
Jim Price <price_ja at hotmail.com> wrote:
> Currently we are using windows metafile format for in-text tables for
> reports created in Word. However, we've discovered some artifactual lines
> being created in our final output once the Word document is changed to PDF.
> The process is as follows:
> If any one can shed enlightenment (or suggest an alternative approach that
> preserves decent fidelity - we've struggled with postscript files in the
> past, but this may be our opportunity to try them out again), it would be
> much appreciated.
The best approach depends on how much you care about the Word
files looking their best before conversion, vs. caring most
about the PDF.
If you care most about the PDF, you can save your graphics as
EPS files from R (either by using the postscript device or the
savePlot function with type = "eps"). I tried one EPS file, and
found that Word 2007 imported EPS better than some older
versions. When I converted to PDF, the graphic was sharp and
clear. The downside of this approach is that before the
conversion Word displays the EPS graphic as a rough bitmapped
preview -- quite workable, but not suitable for final version.
If you want both Word and PDF versions to look good, there is no
perfect solution. You could try generating the graphics as PNG,
which will look good (but not great) in both places. That
approach will likely increase file sizes considerably.
Hope that helps.
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
More information about the R-help