knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The goal of googlePrintr is to connect to the Google Cloud Print API. It is depends on the awesome googleAuthR
package.
You can install googlePrintr from github with:
# install.packages("devtools") devtools::install_github("CannaData/googlePrintr")
Printing:
library(googleAuthR) library(googlePrintr) options("googleAuthR.scopes.selected" = c("https://www.googleapis.com/auth/cloudprint")) options("googleAuthR.ok_content_types"= c(getOption("googleAuthR.ok_content_types"), "text/plain")) # login using googleAuthR gar_auth_service("my.json", scope = c("https://www.googleapis.com/auth/cloudprint")) printer <- gcp_search("myPrinter") gcp_submit(printer$id[1], "New Title", content = "<h1>Hello World</h1>", contentType = "text/html" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.