John, does it have to be PDF? Unfortunately, PDF is not easy to deal with in platform-independent way (and generally as well - of all the systems only macOS has native support for it). If you really have no other choice, my only suggestion would be to use poppler to render it so it can be displayed by R directly. Anything else is a bit more convoluted like embedding it in a webpage and hoping the browser has PDF support, but that tends to be pretty clumsy.
Cheers, Simon > On Nov 14, 2024, at 6:14 AM, J C Nash <profjcn...@gmail.com> wrote: > > Hi, > > I'm trying to prepare a package to manage some diverse data. It is > extremely convenient to display a PDF derived from the data so the user > can verify information that the R script is going to process (even nicer > if on a 2 monitor system). I've 2 issues: > > 1) I can display the pdf either with file_show() from the fs package > or browseURL(). Both leave the pdf displayed and return to the > R "terminal". But when I finish processing at the end of the script, > I want to have the display close. This seems to need (non-platform-neutral) > use of a system() call to wmctrl, which is only on X-windows systems. > Note that the display tools don't seem to return a handle that I can use to > close the display window some other way. On my system both the tools > for display loaded xreader (I'm on Linux Mint Wilma). > > 2) the tools also don't seem to offer window size or placement, which > would be nice. > > Suggestions welcome. > > John Nash > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel