I am trying to export a 3d plot of good quality. Here is a MWE:
ptest = Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}]
Export["test.pdf",
Rasterize[ptest, ImageResolution -> 100, Background -> White],
Frame -> False, FrameStyle -> White]
The problem is that after exporting there is a weird frame in the pdf file. It seems like there is some shade apparent in the bottom and right edge of the file. See the red arrow in the attached picture.
Does anyone know how to fix it?
My Mathematica version is
"12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)"
My Mac OS version is:
ProductName: macOS
ProductVersion: 11.5.2
BuildVersion: 20G95
To see this issue better, here is a screenshot from a tex document: