I came across this and found out that I need the correct device ( cairo_pdf ) to correctly print all the text. Works with grid.arrange too.
For a portrait:
ggsave(filename="yourfile.pdf", plot = yourplot, device = cairo_pdf, width = 210, height = 297, units = "mm")
For landscape:
ggsave(filename="yourfile.pdf", plot = yourplot, device = cairo_pdf, width = 297, height = 210, units = "mm")
Or using dplyr , you can use:
ggplot(...) %>% ggsave( filename="yourfile.pdf", plot = ., device = cairo_pdf, width = 210, height = 297, units = "mm")
source share