Hi all!

I encountered precision problems using pdf().

So far, I found out, that pdf() sets the Mediabox
to even values in dtp points (1/72 inch).

This can be seen in the following example.

page.width <- 13.1/2.54 # in centimeters
page.height <- 19/2.54

pdf(file = "foo.pdf", width = page.width, height = page.height)
plot(0,0)
dev.off()

# The size of the Mediabox in foo.pdf is
# /MediaBox [0 0 371 538]
# but ist should be

dtp.pt <- 1/72

page.width/dtp.pt
# [1] 371.3386
page.height/dtp.pt
# [1] 538.5827

Any ideas to cope with this problem.

Thanks

Roland

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to