gcp_submit: Submit print job to printer

Description Usage Arguments Note Examples

View source: R/gcp.R

Description

Submit print job to printer

Usage

1
2
3
gcp_submit(printerid, title, ticket = jsonlite::toJSON(list(version =
  jsonlite::unbox("1.0"), print = c()), auto_unbox = FALSE), content,
  contentType, tag = NULL)

Arguments

printerid

The ID of the printer

title

Title of print job

ticket

Print ticket, see notes

content

Document to print, see notes

contentType

MIME type of document to print

tag

Tags to add to print job

Note

For info about parameters see https://developers.google.com/cloud-print/docs/appInterfaces#submit

If content is a path to a file it will use httr::upload_file otherwise it well send raw content

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
printer <- gcp_search("myPrinter")

gcp_submit(printer$id[1], 
           "New Title",
           content = 
             "<h1>Hello World</h1>",
           contentType = "text/html"
)

## End(Not run)

googlePrintr documentation built on May 1, 2019, 7:48 p.m.