getTextFonts: Get information about the fonts used for each text node.

getTextFontsR Documentation

Get information about the fonts used for each text node.

Usage

getTextFonts(page, fontInfo = getFontInfo(page), txtNodes = xpathSApply(page, xpathQ("//text", page)))

Arguments

page

an XML node corresponding to a page.

fontInfo

font information from the document

txtNodes

the text nodes for which we want the font information.

Value

A data.frame with elements

id
size
family
color
isItalic
isBold
isOblique
name
text

Examples

f = system.file("samples/2Column.xml", package = "ReadPDF")
doc = readPDFXML(f)
f = getTextFonts(doc[[1]])

dsidavis/ReadPDF documentation built on June 12, 2025, 6:39 a.m.