[R-SIG-Mac] PDF-viewer device?

Simon Urbanek simon.urbanek at math.uni-augsburg.de
Wed Aug 18 15:47:08 CEST 2004


Byron,

since you had a look at that Cocoa graphics device - I have an idea for 
you :). The main drawback of all devices so far is that you have no way 
of getting consistent good-quality output of the plot. You can take a 
snapshot (bad quality) or you can re-run the display list in another 
device (different results), but you have never a true WYSIWYG. However 
on a Mac we can get this: use the regular PDF graphics device and 
render the file output in a widget. The big advantage is that you can 
tweak your plot commands so the plot looks the way you like it, you see 
the result and furthermore you know this is what you get in print, too. 
Presumably it should be possible to build a NSView (or whatever basis 
is convenient) to display a PDF file. The device itself would just 
generate the PDF via the pdf device and display it. Resizing etc. 
should work as expected thus giving you a true WYSIWYG experience. What 
do you think? Sure it's not the most efficient way, but finally I could 
actually see what my plot would look like in the publication - 
something which is a pain atm :). I wanted to look into this myself, 
but I have no time atm :( But maybe your Cocoa basis device would allow 
this easily if slightly modified.. or even your existing device could 
maybe switch between the "native" and PDF mode ...

Cheers,
Simon



More information about the R-SIG-Mac mailing list