0

I have a complex graphic with text which exports correctly as a jpg or png file but if I export it as a PDF then some of the sloping letters are missing. How can I go about debugging it? For the sake of an example, I offer some code below, but the graph that results from this code exports correctly. So, I am also unable to reproduce the error in a simple setting. Non-error example:

test = Graphics[{ RGBColor[242/250, 101/250, 34/250, .7], 
  Disk[{0, 0}, .2], 
  Black, Table[Text["Abcderfghij", {0, 0}, {-1, 0}, {1, i}], {i, -1, 1, .1}], 
  Table[Text["Abcderfghij", {0, 0}, {1, 0}, {1, i}], {i, -1, 1, .1}] },
  ImageSize -> 257];

Export[fpath <> "test.pdf", test]

flinty
  • 25,147
  • 2
  • 20
  • 86
Nicholas G
  • 1,981
  • 10
  • 15
  • I think all Mathematica commands should have a Verbose->True option. But this is not the case... – Gustavo Delfino Apr 22 '21 at 14:12
  • SVG output by itself seems to work Export["test2.svg", test] so maybe the PDF reader cannot handle it as PDF should have embedded SVG unless I'm mistaken. – flinty Apr 22 '21 at 15:14

1 Answers1

1

My workaround was to (1) export a large PNG file (which renders fine); (2) open it in Photoshop; (3) adjust to the desired dimensions and resolution in Photoshop; (4) save as PDF. Exporting a file in the dimensions of the final PDF, even if in high resolution, does not produce a smooth picture, I think that the problem is that sharpening artifacts get introduced. For adjusting FontSize and ImageSize compare Transfer graphics from Mathematica to Word without loss of quality.

Nicholas G
  • 1,981
  • 10
  • 15