Do you see the same with this code, in cut-and-paste ready reprex form?
library(pheatmap)
test <- matrix(rnorm(200), 20, 10)
test[1:10, seq(1, 10, 2)] = test[1:10, seq(1, 10, 2)] + 3
test[11:20, seq(2, 10, 2)] = test[11:20, seq(2, 10, 2)] + 2
test[15:20, seq(2, 10, 2)] = test[15:20, seq(2, 10, 2)] + 4
colnames(test) = paste("Test", 1:10, sep = "")
rownames(test) = paste("Gene", 1:20, sep = "")
# Draw heatmaps
pdf("Results/pheat_test.pdf", width = 15, height = 15)
#> Error in pdf("Results/pheat_test.pdf", width = 15, height = 15): cannot open file 'Results/pheat_test.pdf'
pheatmap(test)

dev.off()
#> null device
#> 1
Created on 2020-04-02 by the reprex package (v0.3.0)