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

stefano iacus jago at mclink.it
Wed Aug 18 19:02:50 CEST 2004


Let me also add this, that I wrote only to Simon:
One other reason, that comes to my mind now is that you cannot rended 
pdf until you close the device, this means that you cannot add 
interactively objects to the graph without rerending everything which 
seems not really efficient for me. Using pdf instead of quartz was my 
original idea, but this is one of the reasons that discouraged me...
We can probably add an "export" function when saving the quartz device 
graphics also for the clipboard copy. Ill add it to my to-do list.

stefano

On Aug 18, 2004, at 5:00 PM, Byron Ellis wrote:

> I agree, I want to drag things into Illustrator or Keynote and have 
> everything look pretty. I have little hope for Word though. :-)
>
> Actually, this is what the original StatPaper (from more than a year 
> ago) did---it actually stored everything in an NSPDFImageRep and then 
> just threw it up on the screen. It should be easy to make the current 
> Cocoa device to do this since we can grab a real PDF from the NSView I 
> think. failing that we can just double buffer and use the 
> NSPDFImageRep (and maybe turn off NSView's offscreen buffer to save 
> some memory), the actual graphics calls remain identical---we just 
> [lock] and [unlock] a different context. Towards this end I've also 
> been trying to exactly match the PDF device with the Cocoa device 
> (whose commandline in the version I'm moving to R-Cocoa lets you 
> specify the ObjC class used for the calls, which is kinda cool)
>
>
> On Aug 18, 2004, at 9:47 AM, Simon Urbanek wrote:
>
>> 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
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
> ---
> Byron Ellis (bellis at hsph.harvard.edu)
> "Oook" -- The Librarian
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list