Issue displaying PDF figures created with R on iOS devices

embedFonts by default doesn't embed the standard PDF font set, and therefore doesn't actually make any significant changes to your example PDF. Try instead

embedFonts("figures/ios-example.pdf",
           options="-dSubsetFonts=true -dEmbedAllFonts=true")

and if that doesn't work, tack "-dPDFSETTINGS=/printer" on there too.

[EDIT August 2020: With current versions of R, another thing to try is switching from the pdf device to the cairo_pdf device. cairo_pdf uses a more sophisticated library for PDF generation and, among other things, it embeds fonts itself.]

For what it's worth, though, your example is displayed correctly on the only iOS device I have to hand (iPad, OS version 4.2.1).


You could also try telling R not to use the Dingbats font to draw points: pdf(..., useDingbats = F)

Tags:

Ios

Pdf

R

Ggplot2