pdfReport: Graphics devices for 'pdf' format bitmap files.

View source: R/taskFiles.R

pdfReportR Documentation

Graphics devices for pdf format bitmap files.

Description

Graphics devices for pdf format bitmap files.

Usage

pdfReport(
  task,
  type,
  ext = "pdf",
  subdir = NULL,
  dirCreate = TRUE,
  title = NA,
  file = NA,
  dim = c(297, 210),
  height = NULL,
  width = NULL,
  landscape = NULL,
  ...
)

Arguments

task

Object of class D4TAlinkTask, as created by initTask.

type

Filename type. If the type is an array, the cocatenation of the elements is used with separator"-". Filenames have the form [task name]_[type].[ext]

ext

Filename extension.

subdir

(optional) Subdirectory.

dirCreate

Logical, if TRUE (by default) the directory is created.

title

title string to embed as the ‘⁠/Title⁠’ field in the document metadata. Defaults to "R Graphics Output"; use an empty string ("") to omit the field.

file

a character string giving the file path. See the section ‘File specifications’ for further details.

dim

device height and width in mm.

height

device height in mm.

width

device height in mm.

landscape

if defined, orientation of the document.

...

Arguments passed on to grDevices::pdf

width,height

the width and height of the graphics region in inches. The default values are 7.

onefile

logical: if true (the default) allow multiple figures in one file. If false, generate a file with name containing the page number for each page. Defaults to TRUE, and forced to true if file is a pipe.

family

the initial font family to be used, normally as a character string. See the section ‘Families’. Defaults to "Helvetica".

fonts

a character vector specifying R graphics font family names for additional fonts which will be included in the PDF file. Defaults to NULL.

version

a string describing the PDF version that will be required to view the output. This is a minimum, and will be increased (with a warning) if necessary. Defaults to "1.4", but see ‘Details’.

paper

the target paper size. The choices are "a4", "letter", "legal" (or "us") and "executive" (and these can be capitalized), or "a4r" and "USr" for rotated (‘landscape’). The default is "special", which means that the width and height specify the paper size. A further choice is "default"; if this is selected, the paper size is taken from the option "papersize" if that is set and as "a4" if it is unset or empty. Defaults to "special".

encoding

the name of an encoding file. Defaults to "default". The latter is interpreted

on Unix-alikes

as ‘"ISOLatin1.enc"’ unless the locale is recognized as corresponding to a language using ISO 8859-{2,5,7,13,15} or KOI8-{R,U}.

on Windows

as ‘"CP1250.enc"’ (Central European), "CP1251.enc" (Cyrillic), "CP1253.enc" (Greek) or "CP1257.enc" (Baltic) if one of those codepages is in use, otherwise ‘"WinAnsi.enc"’ (codepage 1252).

The file is looked for in the ‘enc’ directory of package grDevices if the path does not contain a path separator. An extension ".enc" can be omitted.

bg

the initial background color to be used. Defaults to "transparent".

fg

the initial foreground color to be used. Defaults to "black".

pointsize

the default point size to be used. Strictly speaking, in \abbrbp, that is 1/72 of an inch, but approximately in points. Defaults to 12.

pagecentre

logical: should the device region be centred on the page? – is only relevant for paper != "special". Defaults to TRUE.

colormodel

a character string describing the color model: currently allowed values are "srgb", "gray" (or "grey") and "cmyk". Defaults to "srgb". See section ‘Color models’.

useDingbats

logical. Should small circles be rendered via the Dingbats font? Defaults to FALSE. If TRUE, this can produce smaller and better output, but can cause font display problems in broken PDF viewers: although this font is one of the 14 guaranteed to be available in all PDF viewers, that guarantee is not always honoured.

For Unix-alikes (including macOS) see the ‘Note’ for a possible fix for some viewers.

useKerning

logical. Should kerning corrections be included in setting text and calculating string widths? Defaults to TRUE.

fillOddEven

logical controlling the polygon fill mode: see polygon for details. Defaults to FALSE.

compress

logical. Should PDF streams be generated with Flate compression? Defaults to TRUE.

timestamp

logical. If FALSE, omit the ‘⁠/CreationDate⁠’ and ‘⁠/ModDate⁠’ metadata fields. Defaults to TRUE.

producer

logical. If FALSE, omit the ‘⁠/Producer⁠’ metadata field. Defaults to TRUE.

author

author string to embed as the ‘⁠/Author⁠’ field in the document metadata. Defaults to "", omitting the field.

Value

the file name invisibly.


D4TAlink.light documentation built on Sept. 11, 2025, 1:07 a.m.