Created
April 24, 2024 09:00
-
-
Save jansim/063e2f70c556a9a5fd5cf2f28c669a1e to your computer and use it in GitHub Desktop.
R Script to embed fonts in PDFs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set the directory containing the PDF files | |
pdf_directory <- "path/to/dir/with/pdfs" | |
# Get a list of all PDF files in the directory | |
pdf_files <- list.files(path = pdf_directory, pattern = "\\.pdf$", full.names = TRUE) | |
# Iterate through each PDF file and embed fonts | |
for (pdf_file in pdf_files) { | |
print(paste("Embedding fonts in:", pdf_file)) | |
embedFonts(pdf_file) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment