0
$\begingroup$

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]
$\endgroup$
2
  • $\begingroup$ I think all Mathematica commands should have a Verbose->True option. But this is not the case... $\endgroup$ Apr 22, 2021 at 14:12
  • $\begingroup$ 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. $\endgroup$
    – flinty
    Apr 22, 2021 at 15:14

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.