Learn R Programming

googlePrintr

The goal of googlePrintr is to connect to the Google Cloud Print API. It is depends on the awesome googleAuthR package.

Installation

You can install googlePrintr from github with:

# install.packages("devtools")
devtools::install_github("CannaData/googlePrintr")

Example

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"
           )

Copy Link

Version

Install

install.packages('googlePrintr')

Monthly Downloads

12

Version

0.0.1

License

MIT + file LICENSE

Maintainer

Carl Ganz

Last Published

February 6th, 2018

Functions in googlePrintr (0.0.1)

gcp_deletejob

Delete job
gcp_search

List printers associated with Google account
gcp_submit

Submit print job to printer
gcp_processinvite

Accept printer invitation
gcp_printer

Get details about printer
gcp_jobs

Query submitted jobs