Hugod Posted March 13, 2021 Share Posted March 13, 2021 Good afternoon I am using Affinity Designer (last version) on Windows 10 for my work. I have generated a pdf with matplotlib on python. The pdf looks ok (see attached) but the labels do not display properly when opening the file with Affinity Designer (see the screenshot). However, the pdf displays correctly in Illustrator. Could you help me with this problem? I imagine other people doing analytical/sciency work might have encountered the same issue! Many thanks, Hugo line_plot.pdf Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted March 13, 2021 Share Posted March 13, 2021 There is something wrong with the PDF, I selected the gape_h and used the Mac's look up definition/ check spelling feature. this is what I saw, Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
Hugod Posted March 13, 2021 Author Share Posted March 13, 2021 Thank you Bruce for your rely, that's insightful.. So there might be something wrong with matplotlib rather than Affinity 😅 Quote Link to comment Share on other sites More sharing options...
Staff Sean P Posted March 15, 2021 Staff Share Posted March 15, 2021 Hi Hugod, Interestingly Acrobat can read and copy the text ok on Windows. I'm going to pass it on to development to see if there is anything that can be done. Quote Link to comment Share on other sites More sharing options...
Hugod Posted March 18, 2021 Author Share Posted March 18, 2021 Thank you Sean! Cheers Hugo Quote Link to comment Share on other sites More sharing options...
Timon Posted March 6, 2022 Share Posted March 6, 2022 (edited) Hello everyone, I face the same issue using different pdf's, but also with svg files saved with seaborn / matplotlib. In all pdf readers they're read correctly, but especiialy the text is formatted wrong: point_2_burst_duration_analysis.svg point_2_burst_duration_analysis.pdf Edited March 6, 2022 by Timon Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted March 6, 2022 Share Posted March 6, 2022 37 minutes ago, Timon said: I face the same issue using different pdf's, but also with svg files saved with seaborn / matplotlib. A couple of things. The PDF needs a font I don't have. If I do a Save As... (make a copy) with Apple's Preview application I do not have the messed up text problem. Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
Timon Posted March 6, 2022 Share Posted March 6, 2022 1 hour ago, Old Bruce said: A couple of things. The PDF needs a font I don't have. If I do a Save As... (make a copy) with Apple's Preview application I do not have the messed up text problem. So Affinity Designer needs a specific font in order to work, that the other apps, e.g. Foxit Reader, Firefox, Edge all seem to support? Maybe this font could also be added to be read by Affinity? Also under Windows the fix with saving it again does not seem to work with any of the upper mentioned sw. I am also unable to fix it by changing the font with seaborn: sns.set(font="Verdana") I think I forgot to mention my Affinity Designer version: 1.10.4.1198 Quote Link to comment Share on other sites More sharing options...
Timon Posted March 6, 2022 Share Posted March 6, 2022 On 3/15/2021 at 4:49 PM, Sean P said: Hi Hugod, Interestingly Acrobat can read and copy the text ok on Windows. I'm going to pass it on to development to see if there is anything that can be done. Is a follow up or bug fix of that? @Hugodhow did you manage it fix it in the end? Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted March 6, 2022 Share Posted March 6, 2022 You say you have problems 'using' these PDFs, are you opening them or are you placing them in a Designer Document. If the latter could you not just use Passthrough mode? Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
Timon Posted March 6, 2022 Share Posted March 6, 2022 My idea is to use matplotlib / seaborn to export the Figures as pdf, svg or any other possible format; and then use Affinity Designer to make adjustments. Only having the "Passthrough" option works indeed, but if I want to make specific changes, e.g. increasing some Font size etc, I need to use the "Interpre"t Option, which somehow fails. I wish there could be a fix/workaround/hack for that Quote Link to comment Share on other sites More sharing options...
Timon Posted March 6, 2022 Share Posted March 6, 2022 Unfortunately setting the font's wont change, e.g. here to Times New Roman. Affinity designer still see's the other font, here DejaVuSans, and fails opening all fonts correctly. point_2_burst_duration_analysis.pdf Quote Link to comment Share on other sites More sharing options...
kenmcd Posted March 6, 2022 Share Posted March 6, 2022 3 hours ago, Timon said: Unfortunately setting the font's wont change, e.g. here to Times New Roman. Affinity designer still see's the other font, here DejaVuSans, and fails opening all fonts correctly. DejaVuSans Oblique and Regular are applied to the R2 over on the far left. The change from Arial to Times New Roman did not affect that. Affinity apps have an issue with how matplotlib writes (codes) the text in both the PDF and the SVG formats. Some other applications, including PDF editors, are able to interpret this as text. But some other applications also have an issue with it (open the SVG in Inkscape and look at the "text"). Open the SVG in a text editor and try to find the "text" (the actual text, not the comments). There is another discussion around here somewhere about the text coding in these files. Bottom line is there is no way to edit these in Affinity apps at this time. Quote Link to comment Share on other sites More sharing options...
SveBoFi Posted November 11, 2022 Share Posted November 11, 2022 Also the newly released version 2 of Affinity Designer is still not able to load .svg/.pdf files created by Matplotlib correctly. Other vector graphic editors (even the free Inkscape), pdf viewers and web browsers do not have these bugs. I hope the developers understand that this is not just an annoying bug. These bugs make it literally impossible to use Designer efficiently for graphics in the scientific community in general. If I create several graphics and at least one of them includes a file from matplotlib I won't use a different tool just for this one graphic. I switch the tool for all graphics of this project. And since this is the case for almost 99% of my projects Designer is not useful for me at all at this point. I had big hopes for this update and my colleagues and I are extremely disappointed. It's also a big loss for the scientific community. I hope this will be fixed in the future but I am afraid many users will have permanently switched to a different tool by then. I will probably try it again in some months but I almost lost hope in this product by now. Quote Link to comment Share on other sites More sharing options...
Simon Wei Posted May 15, 2023 Share Posted May 15, 2023 it might be due to the matplotlib backend in Windows machine, you could try the following step: 1. `pip install pycairo` in your python environment 2. call `matplotlib.use("Cairo")` in your python script please let me know if it's help? related github issue:https://github.com/matplotlib/matplotlib/issues/12636/?fbclid=IwAR1ymfx8xKTuKjUi0qVlza1ekNVSbutj5o7xWBUqC6azFSsUML64kIlv2A8 Luc4 1 Quote Link to comment Share on other sites More sharing options...
Luc4 Posted September 22, 2023 Share Posted September 22, 2023 On 5/15/2023 at 1:33 PM, Simon Wei said: it might be due to the matplotlib backend in Windows machine, you could try the following step: 1. `pip install pycairo` in your python environment 2. call `matplotlib.use("Cairo")` in your python script please let me know if it's help? related github issue:https://github.com/matplotlib/matplotlib/issues/12636/?fbclid=IwAR1ymfx8xKTuKjUi0qVlza1ekNVSbutj5o7xWBUqC6azFSsUML64kIlv2A8 @Simon Wei This solved the issue for me, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.